David Galloway [Thu, 1 Nov 2018 20:08:13 +0000 (16:08 -0400)]
cobbler: Install python-jwt on RPM-based testnodes
This package is needed for ceph-mgr but is not available in the
base/default repos. Therefore, we need to install it during kickstart
and bake it into our RHEL FOG images.
Fixes: https://tracker.ceph.com/issues/36653 Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Tue, 2 Oct 2018 18:42:51 +0000 (14:42 -0400)]
testnode: Add support for OpenSUSE Leap 15.0
Some notes:
- Setting hostname with ansible fails. It's a known issue. Bug is in
the yaml. teuthology sets the hostname after FOG provisioning anyway so
NBD.
- Leap mounts all of the root subdirs as separate mountpoints so the `zap`
tasks had to be modified to not wipe those out
- The sshd config is named `sshd_config_opensuse_leap_NA` because the
task that installs the SSHD config uses {{
ansible_distribution_major_version }} which isn't set to 15.0 in Leap
apparently.
Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Wed, 12 Sep 2018 14:45:38 +0000 (10:45 -0400)]
cobbler: Install curl during Ubuntu kickstart
I replaced wget with curl in rc.local because curl is installed by
default in RPM-based distros while wget isn't even available for RHEL8
(yet?). It apparently is not installed by default in Ubuntu though so
we'll install it during kickstart.
Fixes: http://tracker.ceph.com/issues/35952 Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Wed, 5 Sep 2018 18:09:31 +0000 (14:09 -0400)]
cobbler: break at the appropriate location in rc.local
Before this change, if the first NIC on a machine had a link but wasn't
the uplinked NIC, the break would still get called and no NICs would be
left up.
Now we'll break only after we can ping the Cobbler host.
Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Tue, 4 Sep 2018 16:44:04 +0000 (12:44 -0400)]
cobbler: Add kickstarts that will install to /dev/sdm
The root drive on mero nodes is /dev/sdm. Since Cobbler is only used to
provision testnodes prior to a FOG image capture, I didn't think it'd be
worth the time/effort to automate this further.
The kickstart will have to be manually selected if the Cobbler Web UI is
used. I'll automate setting the kickstart when the octo-fog-images
Jenkins job runs.
Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Fri, 27 Apr 2018 16:37:02 +0000 (12:37 -0400)]
testnode: Redo LVM removal
For whatever reason, `dmsetup remove_all` fails on Bionic. As long as
there are leftover lvs or vgs, a pv must be linked to them. We can just
force remove the physical volume which wipes out the rest of the LVM
data.
Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Fri, 27 Apr 2018 15:53:57 +0000 (11:53 -0400)]
cobbler: Set packages to install for Bionic
- udev-discover is no more
- net-tools provides ifconfig which is used in rc.local
- ifupdown provides `ifdown` and `ifup` which are in rc.local
- python is required for ansible
- ntp isn't installed by default anymore apparently
Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Tue, 24 Apr 2018 19:28:42 +0000 (15:28 -0400)]
testnode: Exclude dm devices from list of physical volumes
This was actually happening because when the playbook first runs, the
setup module is run and sees the device mapper devices. We zap them
later in the playbook but ansible doesn't know that. We could just
re-run the setup module but this method will instead guarantee we don't
use dm-* devices.
Fixes: https://tracker.ceph.com/issues/23845 Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Tue, 27 Mar 2018 15:20:02 +0000 (11:20 -0400)]
cobbler: Just output to ttyS1
This covers all baremetal types except mira. Cheetah/Cobbler templating
was breaking with commit
https://github.com/ceph/ceph-cm-ansible/pull/389/commits/de871c037f4ae227bed00933eee24f849a4551b0.
The problem is if there is more than one kernel option type (like
console, ksdevice, etc.), $kernel_options gets expanded into a json
dictionary and breaks the templating.
David Galloway [Fri, 9 Mar 2018 21:51:25 +0000 (16:51 -0500)]
cobbler: Have rc.local output go to console
Usually if something goes wrong during the rc.local run, the machine
won't be reachable to debug over the network. Additionally, since we
reimage every machine before each job now, it's impossible to debug why
rc.local failed given a particular job. This outputs rc.local to the
tty specified in kernel_options so we can see the output in `$hostname_reimage` run logs.
Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Fri, 9 Mar 2018 19:58:08 +0000 (14:58 -0500)]
cobbler: Write exact /etc/default/grub
This fixes console output during Xenial and later. Prior to this, the
Plymouth boot screen would get loaded and "[37mUbuntu 16.04[-1;-1f[33m.
[37m. [37m. [37m." would get repeated to the console until the login
prompt shows up.
Writing our own file instead of finding and replacing variables makes
sure the settings are exactly what we want.
This snippet is only used on Debian-based distros. The default Cobbler
snippet is used on RPM-based distros.
Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Tue, 20 Mar 2018 15:22:53 +0000 (11:22 -0400)]
cobbler: Change method used to ping Cobbler host in rc.local
I've observed a *very* occasional race condition where dhclient
completes but the host can't ping Cobbler. Instead of timing out
waiting for one ping packet to return, we'll try pinging X number of
times (based on $attempts number) and then give up.
I'll paste an example of the race condition observed in the PR notes.
Signed-off-by: David Galloway <dgallowa@redhat.com>
David Galloway [Mon, 26 Feb 2018 18:56:58 +0000 (13:56 -0500)]
pcp: Disable role for now
With the addition of RHEL to Sepia, teuthology will be running
cephlab.yml on unregistered RHEL testnodes. Since the PCP playbook gets run
before the testnodes playbook, RHEL systems in Sepia won't be registered
to our Satellite yet and PCP installation fails.
We're not currently using PCP so we can disable the role and save some
time and headache.
Signed-off-by: David Galloway <dgallowa@redhat.com>