~dannf/canonical-server-hwe-utils:lp1887174

Last commit made on 2020-10-27
Get this branch:
git clone -b lp1887174 https://git.launchpad.net/~dannf/canonical-server-hwe-utils
Only dann frazier can upload to this branch. If you are dann frazier please log in for upload directions.

Branch merges

Branch information

Name:
lp1887174
Repository:
lp:~dannf/canonical-server-hwe-utils

Recent commits

adc4d53... by dann frazier

Revert "Allow console access from all clients to work around LP#1887174"

The conserver packages in Ubuntu are now fixed, so this workaround is
no longer necessary. LP: #1887174

This reverts commit 65836177ea6b33c8580dd46924a0c010d8b67d0a.

96335c8... by dann frazier

Merge ~dannf/canonical-server-hwe-utils:ssh into master

b8325f4... by dann frazier

Use the more concise yaml.safe_load() instead of Loader=yaml.SafeLoader

6e8624d... by dann frazier

Correct spelling: s/sabre/saber/

Now that marketing info is available on Marvell's website, it is clear
that the correct spelling of the platform is "Saber".

Ref: https://www.marvell.com/content/dam/marvell/en/public-collateral/server-processors/marvell-server-processors-thunderx2-micron-nvme-ssd-high-performance-ceph-object-stores-white-paper-2018.pdf

67f89d5... by dann frazier

labkey/maas: Use hostnames= filter in maas.client.machines.list()

I've now learned how to search for machines by hostname[*]. Doing so speeds
up the API call, so let's do that in addition to the hostname->system_id
caching. This may speed things up enough that caching no longer provides a
noticable improvement, but it also shouldn't hurt anything.

[*] https://discourse.maas.io/t/looking-up-node-by-hostname-using-the-api/3509

cf587f5... by dann frazier

labkey: Add ssh subcommand using MAAS to lookup the machine's IP

Since we currently don't have a good DNS setup, I always have to manually
look up the IP address for a machine in MAAS before I can ssh to it. We can
automate that by looking up the machine's IP via the MAAS API. The machine's
MAAS endpoint can be looked up in the lab's clouds.yaml, and we can prompt
the user for their API key.

This is the first labkey subcommand that uses MAAS. To support this, I've
added a LabMAAS class that wraps the maas.client API. This should be
re-usable for any future subcommands that need to access MAAS. Of course,
this adds a new runtime dependency on python-libmaas, which existing users
may not have installed. We import this library on-demand to avoid breaking
existing commands for them.

We also introduce a couple new files in ~/.config/labkey/ that cache data for
future runs:
 - maas-credentials.yaml: Stores MAAS API keys, so the user should only
                          need to enter them the first time.
 - maas-host-cache.yaml: Looking up the MAAS ID for a machine by hostname
                          requires a slow sequential search through all
                          machines. Speed things up by caching that mapping.
                          For the one test host I tried this reduced ssh time
                          from 23s to 7s.
These files are managed by a new class called YAMLCache.

96c74e3... by dann frazier

labkey: Generalize yaml scanning to reduce code duplication

This will make it easier to add additional yaml files in the future.

f59a576... by dann frazier

labkey: Remove accidentally left-in debug code

92c90e9... by dann frazier

Omit the taishan2280v2 from xenial HWE tests

While it should work fine w/ xenial/HWE, we never certified it with xenial.
It was certified w/ bionic/GA:
  https://certification.ubuntu.com/hardware/201907-27213

4845c31... by dann frazier

Add hint to install conserver-client when console command not found