checkBootParam triggers on boot option 'debianrepo' if boot
option 'debianrepotransport' is set, same applies to 'sipwiserepo'
vs 'sipwiserepotransport'.
So be more specific about those checkBootParam checks,
without having to modify the existing behavior of
checkBootParam internals.
Change-Id: I5622f8e96790fd19f0b0e7a0f97668c4b9b1d9f7
The mirror:
deb https://debian-security.sipwise.com/debian-security/ stretch-security main contrib non-free
is available nowadays.
Noticed during review of debian-debug situation.
Change-Id: I7497744afe2430c6848c2b8b39e68bcfba009dc2
Starting with lvm2 v2.02.111 it includes a udev rules file named
/lib/udev/rules.d/69-dm-lvm-metad.rules (see
http://sources.debian.net/src/lvm2/2.02.111-2.2%2Bdeb8u1/udev/69-dm-lvm-metad.rules.in/
wheras its "(PVSCAN_RULE)" corresponds to
RUN+="/sbin/lvm pvscan --cache --activate ay --major $major --minor $minor", ENV{LVM_SCANNED}="1"
in the installed /lib/udev/rules.d/69-dm-lvm-metad.rules).
The udev rule gets triggered during disk changes and
automatically invokes `lvm pvscan [...]`, triggering the
following behavior if a LV is already present on a disk:
| # dmsetup ls # it's empty
| # parted -s /dev/sda mklabel msdos
| # parted -s /dev/sda mkpart primary 1048576B 8589934591B
| # dmsetup ls # this will list already existing LVs, like:
| vg0-swap ....
| vg0-root ...
| # blockdev --rereadpt /dev/sda # this will fail now with "Device or resource busy"
This causes deployments to fail if it's reinstalled on
a system that already had any LVs on the target disks.
Change-Id: I35cdd437e2c8de0ca956adce9891bb0b23f70d3b
When we install puppet from git repo there will be r10k run
executed by puppuet itself and latest code fetched. We shouldn't
delete the code because after reboot puppet catalog will be empty
until someone runs r10k again. But we need catalog present because
we do another puppet run after reboot to finalize steps not executed
in chroot phase.
Change-Id: I6f28ee26bc7a3404e4fd6affb430f05ca7d96b92
Also fix an error when "repeat?" is being asked second time
after the successful re-run (we forgot to reset deploy status).
Change-Id: I621ed48d9eaeb620720d2d1ae4008485adfd346e
We need to disable consistent network device naming to get our
"eth0" back, otherwise we have "random" interface names (which
are stable across reboots in the same environment, but aren't
really predictable by their names).
See
https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
for more information.
Until we've full support for the new interface names let's
disable this feature in our Vagrant environments.
Change-Id: I0f141e585456d64ee7eba7b7e78af938be26bfc2
Shellcheck v.0.3.4-3 is default for jessie and installed
on jenkins CI. It produces fake alarm here, while shellcheck
v.0.3.7-5+ reports no issues here. Fixing warning to make it happy:
In deployment.sh line 1753:
find "${TARGET}/var/log" -type f -size +0 -not -name \*.ini -exec sh -c ':> ${1}' sh {} \;
^-- SC2016: Expressions don't expand in single quotes, use double quotes for that.
Change-Id: I75cd28dacacc65dfdb6b7fd134b8f3c727b1b48d
Debian/stretch no longer provides virtualbox-guest-additions-iso,
retrieve the ISO from http://download.virtualbox.org/virtualbox/ instead.
Change-Id: If257ec3760ec096dd11a4cb8bde4b178fcf9a77a
It is impossible to install puppet node on plain SSD drive:
> Error: /dev/sdc does not look like a VirtIO, ServeRAID, LSILOGIC or PowerEdge disk/controller. Exiting to avoid possible data damage.
Lets ask the user confirmation here, as restart installation
is very slow way in case of manual bonding configuration and
slow IBM hardware POST.
The boot option TARGET_DISK can be used to bypass any checks here.
Change-Id: I6ace2c0225b7e66896a00459594901d06ae7bf0c
Puppet often fails because puppet cert cleanup or something else forgotten
Normally we want to fix the issue and restart puppet without starting
whole installation from the beginning. Here repeat dialog added
to ask for puppet restart. For daily devops recovery tasks still have an
option to bypass this dialog and proceed to the end if 'nopuppetrepeat'
option is set.
Change-Id: I2a6498628c552aa65d5220c84ade6e12454b8f2d
While setting up sources.list for bootstrap stage has been take
care of in commit 24852d04eb already, the sources.list
generation before running ngcp-installer needs to be adjusted as
well.
Change-Id: I94f1cb8057c544e9df678a4f008abf713fa83da3
Ensure hostname is also valid at the beginning, adjust for stretch
where /etc/init.d/hostname.sh no longer exists.
Change-Id: Ia084442d7ea2b8b0e6e43f88af4474d3eda4a061
/etc/init.d/hostname.sh no longer exists in Debian stretch
and newer.
/etc/hostname always exists in our usecase since we create
it straight before setting the hostname, so do exactly
what the initscript usually did for us.
Change-Id: Ibf59c1494dab7978ae40a61cf9eb15c2e54836f6
Otherwise it will fail with:
| 11:04:48 grml-chroot /mnt /bin/bash
| Writing /etc/debian_chroot ...
| --2016-11-09 12:04:48-- https://deb.sipwise.com/autobuild/pool/main/n/ngcp-installer//ngcp-installer-ce_5.0.0.0+0~mr5.0.0.0+0~20161108225948.69+jessie~1.gbp52d5a0_all.deb
| Resolving deb.sipwise.com (deb.sipwise.com)... 92.42.136.158, 2a02:1b8:7:2::c0f:faa
| Connecting to deb.sipwise.com (deb.sipwise.com)|92.42.136.158|:443... connected.
| ERROR: The certificate of 'deb.sipwise.com' is not trusted.
| ERROR: The certificate of 'deb.sipwise.com' hasn't got a known issuer.
| dpkg: error: cannot access archive 'ngcp-installer-ce_5.0.0.0+0~mr5.0.0.0+0~20161108225948.69+jessie~1.gbp52d5a0_all.deb': No such file or directory
Change-Id: Icc08e07fafa4405aeb3896ac73e30b6f5873361d
Debian mirror doesn't support https sometimes, like ftp.de.debian.org
Previously we were not able to use different transports for
Debian and Sipwise repositories. Now we can do it using
boot option 'debianrepotransport'.
Change-Id: Iec43e9831dba37475edc0c42ab32f6e41051c79d
Right now we are not ready to use CNAME here,
lets put correct DNS name here as manual input is
very annoying here during the boot.
Change-Id: Ibbf195752f46f95e3774793f3de25bb8b46ee7e7
IT doesn't nothing on those stages, while produce warnings.
JFYI, all the packages 'libc6-dev gcc bzip2 less linux-headers make sudo'
have been installed already as some NGCP dependencies,
so 'apt-get -y install ...' can also be removed, while lets keep the, for now.
TODO: migrate virtualbox guest edition part to ngcp-installer
(in proper place when apt-get update still works before shutdown).
There must be nothing in deployment.sh after ngcp-installer, IMHO.
Change-Id: I7d4457450b1b688965a73e62007e6958445c9ab6
As we started to use hieradata also from puppet code, hiera.yaml now
points to /etc/puppetlabs/code/environments/ and so we should put puppet
code with hieradata there
Change-Id: I4a5e00124ed6bd1ebd1288d35dc4070dea0f195e
We have to always provide Sipwise Hiera rescue ISO
if we are using recovery from git repository as
it doesn't have any passwords and SSH keys.
In the same time we search drive by label,
so there is no point to have an options here anymore.
Change-Id: Ib47f147cbb3a154f96d37ef31d43acad3a68c9e5
He have spent 2 hours trying to figure out why puppet1.mgm
installation has failed. And it was human mistake with
forgotten boot option. In the same time we must provide
puppetrescuedrive boot option and we should execute Hiera
initialisation in case if puppetrescuedrive is provided.
So, lets reuse puppetrescuedrive for both cases.
Change-Id: I31cd80522fbce720be67090398322b3426701ec9