Skip to content

Commit

Permalink
AWS EFA: Pass in PATH when running efa_test.sh. Reboot after install …
Browse files Browse the repository at this point in the history
…on Ubuntu16.

PiperOrigin-RevId: 352103069
  • Loading branch information
cwilkes authored and copybara-github committed Jan 16, 2021
1 parent a1484a2 commit b4c798f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
- Added ability to install gfortran 9 with --fortran_version=9
- Added MSS support to netperf with `--netperf_mss`.
- Added nfs_service.NfsExport(vm, path) to easily NFS export a directory.
- AWS EFA works for Ubuntu1604.

### Bug fixes and maintenance updates:

Expand Down
10 changes: 8 additions & 2 deletions perfkitbenchmarker/providers/aws/aws_virtual_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,11 @@ def _ConfigureEfa(self, instance):
self.InstallPackages('curl')
url = _EFA_URL.format(version=FLAGS.aws_efa_version)
tarfile = posixpath.basename(url)
self.RemoteCommand(f'curl -O {url}; tar -xvzf {tarfile}')
self.RemoteCommand(f'curl -O {url}; tar -xzf {tarfile}')
self._InstallEfa()
# Run test program to confirm EFA working
self.RemoteCommand('cd aws-efa-installer; ./efa_test.sh')
self.RemoteCommand('cd aws-efa-installer; '
'PATH=${PATH}:/opt/amazon/efa/bin ./efa_test.sh')

def _ConfigureElasticIp(self, instance):
"""Create and associate Elastic IP.
Expand Down Expand Up @@ -1149,6 +1150,11 @@ class Ubuntu1604BasedAwsVirtualMachine(UbuntuBasedAwsVirtualMachine,
linux_virtual_machine.Ubuntu1604Mixin):
IMAGE_NAME_FILTER = 'ubuntu/images/*/ubuntu-xenial-16.04-*64-server-20*'

def _InstallEfa(self):
super(Ubuntu1604BasedAwsVirtualMachine, self)._InstallEfa()
self.Reboot()
self.WaitForBootCompletion()


class Ubuntu1710BasedAwsVirtualMachine(UbuntuBasedAwsVirtualMachine,
linux_virtual_machine.Ubuntu1710Mixin):
Expand Down

0 comments on commit b4c798f

Please sign in to comment.