The file /tmp/ngcp-installer-cmdline.log is available when GRML is running only
and will gone right after the reboot. In the same time original
"${TARGET}/etc/ngcp-installer/config_deploy.inc" is also available
during GRML is running and will stay after the reboot.
For all the time I had no reason to check /tmp/ngcp-installer-cmdline.log,
as I always used config_deploy.inc directly (which is also covered by etckeeper).
Removing it as a part of minimizing log files program.
Change-Id: Idcc2ced1bf2aba261bd519abcdb91c1f8fe0336b
* ngcp-installer*deb can be deleted right after the package installation
* ${TARGET}/config_*yml and ${TARGET}/constants_*.yml are leftovers.
They are no longer available on NGCP (long long time ago we created
them to upload CFG schema dump into git every night).
See commit ba06d2b145e3e20468de532e77fa501cd38a72e7 to netscript.git
Change-Id: I75a575233a5074143d7d35de26b33f161cf77e4f
We have a lot of different log files on GRML/deployment.sh stage,
let's minimize the count here and use main $INSTALL_LOG for all
the messages printed by deployment.sh (it will simpify further debug).
Previously logit() printed to GRML /var/log/syslog which is not
available on NGCP after reboot, the new code will use $INSTALL_LOG.
Change-Id: I675c45ebc2852b00253e7b51e7abd4a10a0fb714
First of all the information here was outdated and confusing.
Moreover it duplicates info in deployment-installer-debug.log.
The line "NGCP_INSTALLER_CMDLINE=..." didn't represent the actual
running command for several years already. Also the line SCRIPT_VERSION
is already printed to all log files several times already.
The only missing line was CMD_LINE, so printing it if debug is enabled.
Change-Id: I19255354c8314201992385f5b5bb7e60910bc26a
This is an old option we do not use anymore.
The option 'ngcpppa' is more flexible and powerful nowadays.
Change-Id: I829189a9e92ee352daa4f826dd3720723c6df3e2
Those firmwares have been moved to NGCP metapackages to ensure
they are always available.
Also Puppet server ensures they are available on
internal infrastructure.
Change-Id: I88cd1d7592ec5290c10f05b1f202114f8c86299a
If NGCP PPA is defined and does NOT contain ngcp-installer package,
we should use the default (release and product specific) ngcp-installer.
Change-Id: Iac0863698e174e333108a0d01bf687c3de85ef99
ngcp-installer installs it already also puppet depends on it.
Also metapackages have dependency on it now.
Actually it looks like Debian stretch debootstrap installs
apt-transport-https out of the box which recommends 'ca-certificates'
as a result both are installed after the debootstrap.
Change-Id: I84fa358b61aed25594a38c21efaec27ba96d6918
NGCP metapackages depends on 'ssh' already. So no need to
install it during the debootstrap process. So far
deployment.sh is being used to recover from Puppet
(ssh module cares about 'openssh-server/-client already)
and also for Debian plain installation where we still need
to install 'openssh-server' manually.
Change-Id: If9c052f0517b1610f0e65ed4a574539b23e23928
The package 'gettext-base' is actually currenlty installed as a dependency:
> root@web01a:~# aptitude why gettext-base
> i grub-pc Depends grub-common (= 2.02~beta3-5)
> i A grub-common Depends gettext-base
Change-Id: If8224f0e67eb1ccdd38ee6523e3a20424e6fe2c3
Originally the code has been added back in 2014 with commit message:
> Support blade disks we have on our internal proxmox cluster
So far at the moment the package 'firmware-qlogic' is not installed on
internal Proxmox blades (as I can see). I would consider it as
unnecessary any more and remove it here. Also it is a bit dangerous to
install some packages on internal test servers only, as production might
behave the different way then. So good to remove it here.
Change-Id: I9817ca0904eade6c51479c72f4cff428a044896f
The package 'apt-transport-https' is available on freshly debootstrapped
Debian stretch already, also NGCP depends on it via ngcp-nth-*.
Additionaly ngcp-installer check 'apt-transport-https' availability in 'check.inc'.
Moreover we will have to remove it here after migration to Debian buster,
as 'apt-transport-https' has been merged into 'apt' there.
Change-Id: I263e9010093096d7b50bb92ae39a996dc4838755
If the systemd status is 'degraded' the exit code of the command
is not 0 so script is interrupted due to '-e' option.
Change-Id: I147da71569dc527004d598c48338fc04dd2ada92
All the services which are run within chroot are stopped when they
are not needed anymore. So it makes no sense trying to kill them
by list moreover the list is outdated.
Here is the ps output before and after these kills:
https://paste.mgm.sipwise.com/show/4107/
there is no services from chroot.
Add debug output of 'systemctl status' if someone uses mountpoint
$TARGET.
Change-Id: I90f0c18157040929aaa52ec572babea1b0bf2eb1
File /etc/network/interfaces is generated by ngcpcfg so deployment.sh
should not modify it further.
Remove unused variables.
Change-Id: I287b5e5bf32834309dc09efab637bf083f479d4c
Remove LVM variable and related code as deployment.sh is version specific
now and in mr6.4+ we definitely use ony LVM.
Change-Id: I1adad68a439ee5356d243f937f37197be1055156
Remove outdated checks of jessie release.
Some shellcheck improvements.
Remove PROFILE variable as it does not exist/used.
Remove outdated comments.
Change-Id: Ie77e9477f0b38019c2a62465426509cdfe6e309a
Collect the list of running process before and after kills in the end
of deployment to catch if we do not stop them properly.
Change-Id: Ie01853723d053a1ef198e47b89566bd4b9a93bbc
Use systemctl (reboot|poweroff) instead of sysrq triggers, we do not need
this workaround in a new grml.
Change-Id: I27d03a402e96e08c902f18eef91ae2144fe128fb
When all variables (DEBIAN|SIPWISE)_REPO_HOST, (DEBIAN|SIPWISE)_REPO_TRANSPORT
are set create and use (DEBIAN|SIPWISE)_URL variables to simplify and unify
their usage.
Change-Id: I2b4578efad0d285a5e5519cad8e5f78b870073a2
Remove workarounds which were used to install old debian releases/ngcp releases.
Remove old versions of Debian from installation list.
Add trailing space to the end of boot parameters to make manual modification
easier.
Change-Id: I201dac4a1d546a83743823cb9dff3546209e6404
Function checkBootParam is fuzzy about search pattern so it
returns false positive result on similar parameters, like 'ngcpppa'
and 'ngcpppainstaller'. It leds to incorrect call of getBootParam
on nonexistent parameter so it returns 1 which causes error exit
of deployment.sh due to 'set -e'.
Add '=' symbol to the end of search pattern for parameters with argument.
Change-Id: I636a66b3e74a395de33d4bdfa9b31eb07fbe03d0
Exporting HOSTNAME inside the loading 'boot parameters' section
causes the following issue (inside GRML chroot):
> (sp1)root@sp1:/# hostname --fqdn
> hostname: Name or service not known
NOTE: it happens if ngcphostname is not defined.
We should separate loading options and using them to
have clear system behaviour, so we move the export code forward.
In this case TARGET_HOSTNAME will be defined from options ngcpsp1/ngcpsp2
and 'export HOSTNAME="$TARGET_HOSTNAME"' will do the job even if
ngcphostname is not defined.
We should consider deprecating/removing 'ngcphostname' completely
if possible, as currently the option description is a bit confusing:
> ngcphostname=... - hostname of installed system (defaults to ngcp/sp[1,2])
> NOTE: do NOT use when installing Pro Edition!
(which says we should not use it on PRO, while PRO installation
cannot happens without ngcphostname option).
AFAIK, it is necessary for Carrier only, to define Carrier host name, like web01a.
Change-Id: Idba31fd8286d41bd0c1aaf7ee762371e6b1d50d5
Stop of mysql was added in the end of ngcp-installer in
installer.git:80ce05d706ed28e906d6b171498f3d2d9f55c84e
but mysql server is required for ngcp-prepare-translations so add
start/stop for this case.
Change-Id: Id0e030533240718517721d12647766eb283607bf
Add option -e to deplayment.sh to catch the installation's errors.
Run deployment.sh as a script not via external interpreter
'bash <name>'.
Change-Id: I320b535f41f08937c4924c603f8e1a17b23e80e8
Check dhclient process as well as boot parameter to decide if
dhcp should be used for external interface.
Change-Id: I5f92cca5a513edcacb99318b7b59d33c1fd55ef5
All used services in installer have to be manually stopped when
they aren't needed so we do not need such a stop cycle.
Moreover services with existing init.d script only can be stopped
in this way. Other services just produce error message:
Stopping <service name> ...
<service name>: unrecognized service
Change-Id: I9aec0b8aa7c4878e538532b9d8997e2438a1277f
fai-setup-storage has no real advantage over plain parted
usage for us nowadays, instead we can avoid depending on
it by using the plain tools.
For ngcp systems reproduce the same setup, for plain Debian
installations use a static size of 8GB for rootfs. This
makes installations more flexible for us.
Change-Id: I5e03ad0a5dd3dac7cc547b8cdc64277db4af4c22
We don't have einfo + eend available in deployment.sh as
we don't source lsb-functions
Change-Id: Ie07d67d105ec2bcb8849c7b04d3b99c7580d6de5
Thanks: Mykola Malkov for spotting this bug
The message `Started Cleanup of Temporary Directories` shows up
during deployment, caused by systemd-tmpfiles-clean.timer which
originally looks like:
[Timer]
OnBootSec=15min
OnUnitActiveSec=1d
To avoid this message to appear during deployment stage let's
disable the systemd timer by masking it.
NOTE: we might disable this timer on default Grml, but this
needs to be discussed yet in further detail and we need
a faster workaround anyway.
Thanks: Guillem Jover <gjover@sipwise.com> for the suggestion to just mask it
Change-Id: Ic85dc58322280f4eaece61af220ae00c64c74e52
There is no any source of mount info (mtab or /proc fs) so this
call is useless. Moreover due to absence of mount info it can catch
segfault:
117e8f0763
Change-Id: I0defcc8e6cb25c3534fef1f0281291c07e02f2d5
deployment.sh is release specific and GRML in trunk
provides grml-debootstrap version 0.81 already.
Change-Id: I193cb8412afb6a8984d5e8263fdaa8417aabbc14