File _patchinfo of Package patchinfo.25290
<patchinfo incident="25290">
<issue tracker="bnc" id="1173532">Missing UEFI support in Distribution Migration System</issue>
<issue tracker="bnc" id="1156068">DMS: sles12sp4 with LVM root partition will fail upgrade to 15</issue>
<issue tracker="bnc" id="1199028">suse-migration-prepare.service should have EnvironmentFile=-/etc/sysconfig/proxy</issue>
<issue tracker="bnc" id="1182520">DMS: fails due to overmounts</issue>
<issue tracker="bnc" id="1181808">Option to preserve files during migration</issue>
<issue tracker="bnc" id="1133919">[TRACKERBUG] FATE#327175: [ECO] Distribution Migration System</issue>
<issue tracker="bnc" id="1182234">12sp5 byos distribution migration fails with dns issue ref:_00D1igLOd._5001iZK5y2:ref</issue>
<issue tracker="bnc" id="1155192">DMS: Migration failure from SLES12SP4 to SLES15SP1</issue>
<issue tracker="bnc" id="1191634">Issue with Migration path in DMS</issue>
<issue tracker="bnc" id="1173654">Distribution Migration process fails in Azure</issue>
<issue tracker="bnc" id="1188594">DMS fail when host behind a proxy</issue>
<issue tracker="bnc" id="1184278">DMS: fails due to mount attempt of already mounted special filesystem</issue>
<issue tracker="bnc" id="1142108">BYOS upgrade from 12sp4-sap to 15 fails</issue>
<issue tracker="bnc" id="1178737">Distribution migration fails on VMs with ext4 root filesystem</issue>
<issue tracker="fate" id="327175"/>
<packager>kberger65</packager>
<rating>moderate</rating>
<category>recommended</category>
<summary>Recommended update for suse-migration-services</summary>
<description>This update for suse-migration-services fixes the following issues:
- Enable prechecks as a systemd process
- Add an EnvironmentFile to suse-migration-prepare.service bsc#1199028
Bump version: 2.0.32 → 2.0.33
- Update pre_checks_test.py
- Update pre_checks.py
- Update kernels.py
- Add fix option to pre-checks
- Remove --no-kernel from host independant initrd
- Add an unsupported caveat for hpc
- Add multiversion kernel checks to pre-checks
- Enable prechecks for SLES15-Migration
- Add fix for setup in tests
- Change verbosity for verbose
- Update:
- doc
- schema
- reading config file
- tests
- Add more details around migration_proudct
- Add an option to create a 'fat' initrd
This change adds a new systemd service, regenerate-initrd that is
responsible for running the dracut command when the config setting
'build_host_independent_initrd' is enabled.
This service is configured to run before the kernel-load service
and allows a new initrd to be created after the migration is complete
and before the final system reboot is performed.
- Fix pytest 7 compatibility
- Mock lsblk call
- Mocks the command call for tests that run in
an environment with no partitions or
partitions have not been defined
- Add zypper migration plugin verbosity
Run the zypper migration plugin with verbosity option
for debuggin purposes
This Fixes #230 and bsc#1191634
- Add migration_product to documentation
This Fixes #229
- Show config file content in the migration log
This Fixes #228
- Bump version: 2.0.31 → 2.0.32
- Add test for fstab with no options
- - Handle fstab entries that have no fs options specified
- Add blank line to fix checks
- Regroup migrate test
- Regroup path test
- Regroup mount system test
- Regroup product setup test
- Regroup grub setup test
- Regroup kernel load
- Regroup prepare test
- Regroup ssh keys test
- Regroup reboot test
- Regroup command test
- Regroup logger test
- Regroup pre checks test
- Regroup SUSEProduct test
- Regroup SUSEConnect test
- Refactor reboot tests
- Bump version: 2.0.30 → 2.0.31
- Remove SMT references (#223)
SMT is no longer supported by SUSE and users are encouraged to migrate
to RMT. We want users to use RMT servers, or SCC as targets for receiving
system updates. Also improve requirements description and make the requirements
for the repository server more explicit w.r.t. availability of the proper channels.
- Add comment for lower case and reflect that on test
- Update env and log it
- In case of preserving the proxy file
add those settings to the environment
before starting the migration
- Log environment variables, this information
is helpful if a proxy is set (see bsc#1188594)
- Remove no-cd option from zypper-migration command
- Bump version: 2.0.29 → 2.0.30
- Add valid remote repo prefix (#220)
Add valid remote repo prefix
Add plugin:/susecloud prefix for repositories checking
Remove extra Logger definitions to avoid duplicate entries
- Bump version: 2.0.28 → 2.0.29
- Set --no-cd option in the right place
- Bump version: 2.0.27 → 2.0.28
- Make zypper ignore CD/DVDs repositories
- Edit message for pre checks repos
- Add a more informative message if
problematic repos are found
This Fixes #214
- Add line breaks for remote repos
- Remote repos message in pre checks, potentially,
will produce long lines. Add line breaks for better
readability
This Fixes #215
- Bump version: 2.0.26 → 2.0.27
- doc: Fix a typo + try to sound more active: "we recommend ..."
- doc/DC: Update to suse2021 stylesheets
- Use download-in-advance mode for zypper dup
If the DMS was configured to use 'zypper dup' we should
download packages in advance for more stability. The reason
is that zypper dup always starts with deleting packages and
then continues with installing packages. If at install time
a package cannot be downloaded for some reason the zypper
process ends and leaves the system in an inconsistent state
- Bump version: 2.0.25 → 2.0.26
- Fixed suse-migration-services package build
The migration services package must not contain the pre-checks
which are only relevant in the activation package
- Setup package conflicts properly
migration services and migration activation conflicts.
The activation is installed on the host to migrate, the
services are installed in the live migration image. There
is no situation in which migration services and activation
is installed on the same host. As both packages are build
from the same python sources they have to conflict
- Fixed migration services package build
Several issues fixed in this commit:
* Moving the sed original file over the changed one prior
calling sdist invalidates the actual change
* Fixed spec template for the activation
The package builds a python and a grub.d app. Thus the
instructions in the spec file to install from the two
places needs to be adapted. In addition the %post section
now runs a binary which is called in the process of creating
an rpm in the checks processing. Thus all python requirements
must be in BuildRequires
* Make sure prechecks are grafted in MANIFEST
- Bump version: 2.0.24 → 2.0.25
- Add pre checks
This extends the activation package
- Check no remote repositories
- Check filesystem has LUKS encryption
The checks are kept in their own files and run
on the host, before rebooting.
This Fixes #205
- Update option settings in zypper dup mode
When using the DMS in zypper dup mode the option
settings --allow-downgrade and --no-confirm are handy.
Even though I think with the global non-interactive
option set it should not be required to set no-confirm
in addition but the worst are questions being asked
so better add it. With allow-downgrade set the ability
to downgrade packages is given. With zypper dup the
repo setup is user defined custom set and therefore
downgrades should not be off the table
- Respect host kernel boot options for migration
Follow up commit to add a reference to bsc#1182520
- Bump version: 2.0.23 → 2.0.24
- Support symlinks for certificate files
- Cracefully handle cert copy exceptions
If the copy process of a certificate failed this should not
cause the entire migration process to stop. This commit
handles copy errors from the cert chain and turns them into
a log message. If in the subsequent chain of tasks the
migration failed because of missing certificates we will
see that in the log and in the attempt to access the repos
which is better than the python stacktrace on an unhandled
FileNotFoundError exception. Retated to Issue #197
- Bump version: 2.0.22 → 2.0.23
- Prevent use of shutil.copytree
The versions of copytree comes with a different set of
features depending on the used python interpreter. The
former implementation used an option which did not exist
on python in SLE15. To keep us safe from further surprises
I moved back to the simple but stable shutil.copy method.
We can come up with a refactoring PR when needed but not
combined with the fix for the certificates as this was the
original intention of the change
- Bump version: 2.0.21 → 2.0.22
- Fixed import of certificates
Certificates can exist on several places. This commit
makes sure we lookup certificates at the following
places:
* /usr/share/pki/trust/anchors
* /etc/pki/trust/anchors
- Bump version: 2.0.20 → 2.0.21
- Fixed mount of root for detected disk
The former implementation looped through a list of block
devices, mounted them, looked for the fstab file, reads it
and umounted the device again. In a next step we mounted
all entries from that fstab file as listed. The problem
with this approach is that the mount of the root device
already happened and we did it again. As this is not needed
it should also not create a problem. But it does create
a problem in multipath environments. With the absence of
the multipath setup in the live migration system only one
of the multipath devices can be mounted. This device was
found by our loop approach but is not necessarily the
right choice when mounting the device as referenced from
the fstab file without multipath running. Therefore this
commit makes sure the root device is mounted only once
and only through our best guess loop and not by the entry
in the fstab file.
- Bump version: 2.0.19 → 2.0.20
- Respect host kernel boot options for migration
The kernel boot options used on the host to migrate can be
important for the migration live environment too. For example
if net.ifnames is passed is influences the network interface
names to become predictable. As the DMS inherits configuration
data from the host e.g the network setup, it's required that
also the kernel boot parameters matches.
- Bump version: 2.0.18 → 2.0.19
- Reference commit for SUSE maintenance
This commit adds a reference to bsc#1184278
Avoid multiple mount attempts
- Added kernel-firmware to support bare metal better
For the DMS to boot on bare metal system we should install
the kernel-firmware package. If not present certain systems
like HP with Mellanox driver fails to boot. This is related
to bsc#1182520
- Fixed loopback root setting
The root variable for the loopback search in grub was initialized
with the assumption that the /usr/share/ location on the system is
on the root partition. This assumption could be incorrect and the
code should be smart enough to detect this situation.
This Fixes #192
- Use ismount
- Change the command "mount -q $mountpoint"
for Python method "os.path.ismount($mountpoint)"
- Avoid multiple mount attempts
- Fstab could contain one of the mount points
DMS mount explicitly, ending up in an exception.
To avoid this, DMS does not mount the explicit
mount points if they are in fstab.
This Fixes #191 and bcs#1184278
- Bump version: 2.0.17 → 2.0.18
- Added sort by path order for fstab handling
Don't trust the order of entries in the fstab to be correct.
Instead add a canonical path order to the fstab entries
when processed by the distribution migration system.
This Fixes #188 and Fixes bsc#1182520
- Fixed umount inconsistency
There is the mount-system service which mounts the system
taking fstab into account. If it fails for some reason it
also umounts all parts of the system. However in the sequence
of the error condition there is also the grub-setup service
which uninstalls the migration package and restores the
grub config such that the subsequent boot process does no
longer boot into the migration system. With the error
condition from above the grub-setup service has no chance
to perform its jobs because all of system-root has been
umounted already. This commit makes sure that mount-service
only registers the mount paths but does not umount them
in case of a failure. This allows grub-setup to do its
job and also allows the reboot service to umount registered
devices prior reboot. This is related to bsc#1182520
- Bump version: 2.0.16 → 2.0.17
- Do not copy /etc/resolv.conf if empty
This Fixes #185
This references bsc#1182234
- Fixed documentation header
The information about author, version, date and source link
was partially duplicated and also misplaced. This commit
cleans it up
- Avoid deprecation warning
- Keep the flag whitelist_externals,
which will be deprecated for allowlist_externals
in the future versions, for compatibility reasons.
- update whitelist externals to bash
- Bump version: 2.0.15 → 2.0.16
- Allow non standard paths
Create dir if not exists before copying
- Bump version: 2.0.14 → 2.0.15
- Move to github actions
Travis has a strange opensource model
- Extend preserved files
Add option to preserve files.
This fixes #180
This references bsc#1181808
- Bump version: 2.0.13 → 2.0.14
- Set right root type fs
When root type is extX, insmod is extX and it should be ext2
that way grub ext2 module supports all extX fs.
This Fixes bsc#1178737
- Bump version: 2.0.12 → 2.0.13
- Update SMT cache
Due to a cache inconsistency, the cache
update needs to be triggered.
This is related to bsc#1173654
- Bump version: 2.0.11 → 2.0.12
- Trim newline at findmnt output
The output of the findmnt command returns information that
closes with a newline. This newline was used as part of the
device name and leads to errors on the subsequent lsblk
call which uses this device name.
- Bump version: 2.0.10 → 2.0.11
- Added update of regionserverclnt for Azure
In case of the Azure cloud the auto detection code for the root
disk device does not work when running the distribution migration
live system. Therefore it's required to pass in the correct
information as option to azuremetadata. This is related to
bsc#1173654
- Bump version: 2.0.9 → 2.0.10
- Explicitly request python3-azuremetadata
There are two packages in the SUSE namespace for an
azuremetadata tool. An old one and a new one. It seems
the package does not correctly set provides/obsoletes
which causes the old azuremetadata package to be
pulled in when it should be python3-azuremetadata
- Bump version: 2.0.8 → 2.0.9
- Reference commit for SUSE maintenance
This commit adds a reference to bsc#1173654
The rebuild of the DMS image will include an updated
version of python3-azuremetadata version="5.1.0"
which is required to upgrade from SLE12 to SLE15
in the Azure cloud
- Mount EFI subvolume prior loopback
If the efi grub modules lives in a btrfs subvolume it's
required to mount the subvolume to allow module loading
- Use dynamic loader allocation
Set linux and initrd loader depending on the grub_platform
This is related to bsc#1173532
- Fixed reading of grub cmdline options
If the grub setup uses linuxefi or a $linux variable
the regular expression to extract the kernel cmdline
failed. Related to bsc#1173532
- Use file based syscall for kexec operation
To avoid permission problems on load of the kernel use
the new KEXEC_FILE_LOAD syscall instead of KEXEC_LOAD
This Fixes #174 and Fixes bsc#1173532
- Documentation update
* Pull cloud specific caveats into their own section
* Explicitly set the supported migration path for cloud instances
* Minor woring improvements
* Remove section about setting the migration target to make it a
hidden feature
- - Improve expressiveness of upgrade condition in case of multiple root
file system presence.
- Rewording for clarity
- State the focused system is the main one
- Bump version: 2.0.7 → 2.0.8
- Reference commit for SUSE maintenance
This submission creates a reference to bsc#1156068
- Bump version: 2.0.6 → 2.0.7
- Preserve zypper log
Mount zypper log in the host system.
This Fixes #168
- Bump version: 2.0.5 → 2.0.6
- Mount only existent devices
Before, mount service mounted everything on
/etc/fstab, now that service takes into account
the entries that have an existent path.
This Fixes #165
- Bump version: 2.0.4 → 2.0.5
- Fixed handling of busy state on system-root
The console log service holds a busy state on the system-root
mount because the log file is written on the host to migrate.
At reboot time the service should be stopped to allow a clean
umount procedure prior reboot. In addition the console log
service should only restart on failure and not always
- Bump version: 2.0.3 → 2.0.4
- Disable lvmetad
lvmetad running on the live migration host does not play well
with the volumes activated for the system to migrate. Any
chrooted operation will cause lvmetad to complain and to fall
back to internal scanning
- Add support for LVM managed devices
LVM managed devices requires the detection as such in the
mount_system service as well as the activation of the
volume group prior mounting. This Fixes bsc#1156068
- Fix typo for doc
- Update documentation
Better clarify the intended use of the system for
Public Cloud instances.
- Bump version: 2.0.2 → 2.0.3
- Make sure logger directory exists
- Bump version: 2.0.1 → 2.0.2
- Cleanup and fix logging
The logger class contained methods never used. In addition
the logging setup was wrong and only partially working. Any
unit file represents a systemd call. This means any unit file
is an extra program call which requires the initialization
of the python logging facility. The logging itself is also
extended in a way that any external program calls from the
Command class will now be logged and written to the logfile
at call time
- Conditionally check if the system is registered
Only if the zypper migration plugin is used it's required to
check if the system is registered. In case use_zypper_migration
is deactivated through the config file the migration will
run zypper dup with a customer specific set of repositories.
In this case it's not neccessarily required that this system
is registered to use a SUSE repository server.
- Make sure .ssh directory is a managed directory
- Bump version: 2.0.0 → 2.0.1
- Fixed registration check
The SUSEConnect call to check if the system is registered was
called in the live migration system environment. Of course there
it will fail because the live migration system is never registered.
The call has to be performed chrooted inside of the system we
want to migrate. Thus the caller arguments as well as the call
time in the preparation unit needs a fix
- Bump version: 1.2.2 → 2.0.0
- Reference commit for SUSE maintenance
This submission creates a reference to bsc#1155192
- Bump version: 1.2.1 → 1.2.2
- Cleanup code for style and scope
Static methods should be explicitly written as such.
As we are on python3 there is no need to inherit from
Object for classes. Also respect the 80chars per line
limit
- Fixed static method call
The method is_registered is implemented as object method
but is called as static method SUSEConnect.is_registered().
This is wrong and causes a python runtime error on missing
argument: self
- Consolidate image description in git
Maintain the live image description which implements the
platform for the upgrade process here in git. This allows
for better maintenance of the description data as well as
provides scope (pubcloud) to the description and also
keeps the version number in sync with the process code
- Bump version: 1.2.0 → 1.2.1
- Add valid registration verification
System must be registered for the migration to succeed.
This Fixes #150
- Bind mount usr/lib/zypp/plugins/services
Bind mounting usr/lib/zypp/plugins causes that
old version of urlresolver gets called which
breaks the migration on the zypper level.
Instead of mounting all the plugins path, only services is needed.
This Fixes #151
- Bump version: 1.1.9 → 1.2.0
- Reference commit for SUSE maintenance
This submission creates a reference to bsc#1155192
- Bump version: 1.1.8 → 1.1.9
- Add requires for minimun version
Boolean expressions are available with rpm >= 4.13
and SLES_SAP provides product(SLES) = %{version}-%{release}
- Bump version: 1.1.7 → 1.1.8
- Disable use of bool expressions in Requires
Available with rpm >= 4.13. Thus we can't build for SLE12
because rpm is older there
- Bump version: 1.1.6 → 1.1.7
- Fixed Requires syntax
According to https://rpm.org/user_doc/more_dependencies.html
boolean expressions must be embedded into brackets
- Bump version: 1.1.5 → 1.1.6
- Fixed superfluous newline in changelog generator
- Bump version: 1.1.4 → 1.1.5
- Fixed changelog reference commit
An old reference commit was used which has to be updated because
a manual change to the .changes file on obs was done :(
- Add or condition properly
- Bump version: 1.1.3 → 1.1.4
- Added activation spec changes to changelog
Changes that happened on the activation package spec file
were not part of the package changelog generated by
helper/update_changelog.py
- Bump version: 1.1.2 → 1.1.3
- The minimum migration starting point should be
SLES 12 SP3
or
SLES For SAP 12 SP3.
- Bump version: 1.1.1 → 1.1.2
- Fixed reboot call procedure
the systemd magic that detects whether to do kexec or not, is only
applied if we invoke reboot. systemd internally maps reboot to one or
the other of 'systemctl reboot' or 'systemctl kexec'. Therefore the
current implementation which just call 'systemctl reboot' does not
transparently detect for kexec. As we don't want to rely on the
magic behind the reboot call we explicitly call systemctl with
reboot or kecec depending on the configured soft_reboot
configuration option. This is then also in line with the code
that runs 'kexec load' which also depends on the configured
soft_reboot value.
- Bump version: 1.1.0 → 1.1.1
- Fixed reading of config files
There are two potential config files, both are optional
but one of them was opened in any case and if not present
raises an exception. This should not be the case and gets
fixed by this commit
- Fix changelog inconsistency
It seems there was a changelog entry added in obs but not
in the git history for the suse-migration-sle15-activation
package. This commit brings all in line again
- Bump version: 1.0.5 → 1.1.0
- Do kernel mounts in mount service (not in prepare service)
If the /dev, /proc and /sys mounts are done in the prepare service,
then exceptions thrown between mount system and prepare result in
the grub config not being applied. Moving these mounts earlier in
the process ensures that the grub setup service has everything it
needs (see https://github.com/SUSE/suse-migration-services/pull/142
for more detailed discussion of the problem).
- Require SUSEConnect updated version
In a failed distribution migration scenario,
zypper-migration does a rollback. During this
rollback, zypper tries to refresh deactivated
repos, making the rollback fail.
This has been fixed in the newer (0.3.20) version of SUSEConnect.
This Fixes #133
- Add schema validation for migration config file
If the custom config file is empty or contains only comment lines,
it will now be ignored (rather than raising an exception and killing
the migration). If the file is corrupt somehow, or violates schema
validation, an error will be logged and the migration will abort.
Validation is *also* applied to the default config file (the one
inside the migration image). This makes automated testing easy,
because we'll effectively do automatic validation on any of the
test config files, whether they're for default config or custom
config.
- Delete left over debug print statement
- Auto detect migration product
As there could be different targets (SLES, SLES_SAP, etc)
instead of setting the target in the custom file, the migration
system auto detects the migration product.
In order to do so, the target version is read from the live system.
This Fixes #129
- Bump version: 1.0.4 → 1.0.5
- Perform reboot through systemd
reboot is performed through systemd. The call through systemd
checks if there is a kexec loaded kernel and transparently
turns 'systemctl reboot' into 'systemctl kexec'. Thus both ways,
soft and hard reboot are managed in one call. This is related
to Issue #111
- Allow for vendor change during migration
The migration concept allows for the zypper dup as well as
for the zypper migrate approach. In the first case the user
is responsible for setting up the repos and we expect that
to be done in a way that vendor changes are acceptable. In
the second case a repository server is used to serve the
repos and we expect that registration instance to be trustworthy
such that potential vendor changes are also allowed
- Add option to configure reboot method
This adds a soft_reboot option, which if set to false results in
a hard reboot, as opposed to using kexec.
Fixes #111
- Reference commit for SUSE maintenance
Fix BYOS upgrade from 12SP4-SAP to 15 (BSC#1142108)
- Bump version: 1.0.3 → 1.0.4
- Switch changelog generation to UTC
For new entries the UTC format is used because package
submissions will happen from different time zones
- Bump version: 1.0.2 → 1.0.3
- Update changelog creation process
In the same way like in the kiwi project we apply the
creation of the changelog based on a reference file.
This allows to work with maintenance which declines
any request that changes an entry of the changes file
even if this change just updates the full author name
- This submission creates a reference to bsc#1142108
- Refactor product setup
Add SUSEBaseProduct class to detect and handle the
installed base product. Related to Issue #129
- Bump version: 1.0.1 → 1.0.2
- Try to find a more generic name
glob match can return, files and directories. We only
work on files but the variable should not indicate scope
when there is none
- Fixed network setup
The network setup was based on an overlay bind mount of the
entire /etc/sysconfig/network directory. However that directory
also contains script code and functions that are used by system
tools like netconfig. The scripts here are not compatible between
distributions. Thus the overmount of /etc/sysconfig/network/scripts
from SLE12 to SLE15 as one example breaks the netconfig tool and
prevents the update of the /etc/resolv.conf file on network
restart. Other negative effects of that overmounting are likely.
Therefore this commit changes the way we inherit the network setup.
Only the plugin directory and the interface configurations are
taken from the host, all the rest stays untouched.
- Language/typo fixes
- - User doc
+ Clarification around the choices of invoking the migration process using
reboot or kexec
- Bump version: 1.0.0 → 1.0.1
- Update documentation
Mention the two methods to start the migration
- Partially revert the no bootloader based startup
After testing the kexec based implementation to start the
migration live image, we found that kexec does not work in
all cloud providers. Especially those using Xen like AWS
do not work. Thus it's required to keep the alternative
bootloader based startup sequence
- Bump version: 0.6.5 → 1.0.0
- Avoid bootloader to run the migration
Instead of a reboot the customer should run the migration
by calling run_migration. This commit adds a service utility
to run the migration. The concept is based on kexec and
avoids the modification to the bootloader setup. This allows
more flexibility for clouds that runs instances not directly
through a bootloader and also avoids infinite boot/reboot
cycles in case of an early error of the migration mount
service. This Fixes #108
- Bump version: 0.6.4 → 0.6.5
- Fixup udev reload on rule changes
The current restart sequence is missing the actual set/change
of device nodes. This also prevented network interface names
to be added/renamed.
- Bump version: 0.6.3 → 0.6.4
- Fixed post mount service unit file
Wrong path to executable
- Bump version: 0.6.2 → 0.6.3
- Added limitation note as suggested by Robert
- Rename migration package
Avoid confusion and possible error due to wrong package name.
Fix #122
- Added doc chapter for new preserve section
- Added post mount service
The post mount service is used to preserve data from the
system to be migrated into the live migration system directly
after the mounting of the system to be migrated. It is is
also responsible for making that data effective in the live
migration system. The current implementation allows for
preserving udev rules file and make them active.
This Fixes #100
- Capitalize steps list
- Rename config option to use zypper migration
Rename the option to use zypper migration path, wether a plugin or
a sub-command is not relevant for the name.
Fixes #118
- Bump version: 0.6.1 → 0.6.2
- Update per suggestions by Tom
- Update per review by Robert
- Update per review by Robert
- update per review by Jesus
- update per review
- update per review by Tom
- Update per review
- Support PARTUUID specifier in fstab
- Update documentation
Added section about possible config file values including
the explanation for the different zypper install modes.
This Fixes #99
- Allow to skip local fstab paths
If a device path is referenced as local path in the fstab file
but can't be found on the system, this device path is skipped.
Usually a device path references a storage node that exists
as /dev/.. node on the machine. However it's possible to also
reference files e.g for loop mount in the fstab file. If that
file reference is not present in the live migration system it
is ignored because considered harmless. file references in
fstab are sometimes used for swapfiles or other file mapped
data. For the purpose of the migration we consider such paths
as not belonging to the system. This assumption of course
could be wrong which is why we also write a warning message
to the log file once this situation is disovered. This
Fixes #110
- Bump version: 0.6.0 → 0.6.1
- Place network logging in network service
- Fixed SSH identity copy
The SSH host identity is provided by the server credentials that
makes up the fingerprint of that host. However the copy of the
files should exclude the encrypted private key ssh_host_key which
can only be read on the origin host. In fact a copy of that file
to another host will lead to a segfault in sshd and kills the
connection without any further information.
- Log bondN info if bonding directory exists
- Bump version: 0.5.30 → 0.6.0
- Ignore blank lines and comments when parsing fstab
- Provide detailed network information
After network.online target is done, we log
the network status, interfaces and relevant information.
Fixes #84
- Inherit ssh host keys
The live image creates its ssh host key on boot. However that
host key does not match the host key from the system to migrate.
This leads to a warning message on a changed host key when a
ssh login attempt is made while the migration runs. As the
migration live system inherits the network setup it should
also inherit the ssh host key. This Fixes #86
- Cosmetic changes to handle error codes from zypper
Make it more explicit to the reader that we treat specific
values from zypper as errors. Positive side effect is that
if the list gets longer the condition does not need to
change
- Try to mount raid partitions
`lsblk` returns "raid1" (or similar) for /dev/md devices, so we need
to attempt to mount these as well as regular partitions in case the
root disk is on mdraid.
- Fix grub setup if root is on a raid device
If the root filesystem is on a raid device the boot parameter
rd.auto must be passed to the boot such that the dracut raid
module can setup the raid prior to iso-scan.sh searching
through the devices. Related to Issue #96
- Rebuild grub conf on uninstall of activation rpm
If the activation package is installed a grub config file
extension is applied. On uninstall of the package that
extension will be deleted but it only becomes effective
if the grub config will be rebuild. This Fixes #94
- Add support for zypper dup mode
By default the migration system uses the zypper migration plugin
to migrate the system. This works if the system is SLES registered
and an upgrade path from SCC exists. For system where this is not
possible an alternative method can be switched on with the
custom configuration option use_zypper_migration_plugin set
to: false. In this mode we just call zypper dup. Please note
this requires that the user has pre setup the repositories before
the migration system gets started. This Fixes #72
- Use `uniq` when finding root device in grub activation script
If the system is using mdraid on the root disk, the `lsblk` invocation
will return two lines matching "/$", e.g.:
/dev/md1
/dev/md1
This then breaks the subsequent `blkid` invocations, so $root_uuid and
$root_type are set to empty strings. When you later boot into the
migration system, grub gives two errors:
error: one argument expected.
error: no such device: root.
Adding `uniq` fixes this.
- Implement import of custom configuration file
Instead of the system-root/etc/sle-migration-service file which
was used to setup debugging only we now allow the custom config
file system-root/etc/sle-migration-service.yml whose contents
gets migrated into the existing /etc/migration-config.yml on
the live migration host.
- optional file
- Change debug flag file to option
Before, to stop rebooting it was needed to place a
file as a debug flag. Now there must be a debug key option set
in the custom file.
- User documentation
Add distribution migration system user documentation.
- Caveats and unsupported conditions
- Structure and content for the doc tool chain
- Recommendation about ssh key access
- State that clean up of /etc/issue is needed
- Daps style for suse docs
- Fixed spec file of activation package
A %install and %build section is required otherwise the
default contents of those sections applies which leads
to the creation of a debuginfo setup that failed on a
noarch package
- Reference commit for SUSE maintenance
This submission creates a reference to fate#327175 and bsc#1133919
- Bump version: 0.5.29 → 0.5.30
- Reference commit for SUSE maintenance
This submission creates a reference to fate#327175 and bsc#1133919
- Bump version: 0.5.28 → 0.5.29
- Fix reboot race condition
The issue described here came up with the package split and
rename of the activation package. The grub setup service
deletes the activation package and calls grub2-mkconfig which
deletes the migration live boot entry as well as updates grub
to boot the migrated system. However if the activation package
could not be removed the process ends in a boot loop. Therefore
one part of this patch makes the removal of the migration
packages more robust. Another part provides detailed log
information about the removal and the grub setup in the log
file.
Last but not least the patch includes a refactoring of the
umount and reboot process which offers a race condition if
the grub-setup service has failed. The patch here also
Delete the umount service and put the code in the reboot
service. Only on reboot we umount the system. In case of
debugging we want to have full access to the root of the
system that should have become migrated. In addition the
systemd dependency chain for the kernel-load vs. reboot
service was racy and got fixed by a clear dependency
for grub-setup -> kernel-load -> reboot
- Bump version: 0.5.27 → 0.5.28
- Fixed deletion of activation package
Due to the split of the services package the activation
package name is target specific and needs to be matched
by a pattern
- Split activation package from services
From a release process it doesn't make sense to keep the activation
script as a sub package of the services. The reason is because the
suse-migration-services package will be released to the migration
target distribution and the activation package will be released to
the migration start distribution. Thus the code is relevant on
different distributions and it is not useful to maintain that in
one package. This Fixes #74
- Bump version: 0.5.26 → 0.5.27
- Fixed network requirement
To come up with a race free network start the setup-host-network
service has to be called after network.target. This ensures the
wicked service is already active. An active wicked service allows
for a reload of the network service. The setup-host-network
service overmounts /etc/sysconfig/network and reloads the network
service. That tells the running wicked service to elaborate
over the new ifcfg configurations and updates the network status.
In the prepare unit we require the network-online target which
makes sure it operates only on an online network.
- Bump version: 0.5.25 → 0.5.26
- Fix network setup service
The network setup service for the migration inherits the
network as it is configured on the system to become migrated.
As part of that process the network is restarted through
systemctl. However this is a problem because it interferes
with the network service dependency chain. This could result
in a failed network startup depending on how fast other
services e.g dbus are up and running. So the way we do it
causes a race condition. This commit deletes the network
startup from our network setup service. Our network setup
service runs by definition of the unit file before the
network.target. This means at the time the network service
activates the network our setup routine is already done and
a normal network startup should be guaranteed.
- Bump version: 0.5.24 → 0.5.25
- Make sure /var/lib/cloudregister exists
At cloud registration time information about the SMT/RMT server
is provided below /var/lib/cloudregister. For migration it's
required to bind mount this path from the system to become
migrated into the live migration system.
- Support new cloud regionsrv client
The new cloud region service client comes with a plugin for
zypper that translates repo URIs into a specific plugin format
such that it's no longer possible to gain access to the SLES
repositories of our public cloud infrastructure by playing
tricks with snapshotting an on-demand instance without the
billingtag. However the new and fancy way makes migration of
such a system more difficult because the new repo URI format
must be known to zypper migration. This requires all software
components to be provided in the live migration image which
has been done in the image description but furthermore requires
that the cloud specific /etc/regionserverclnt.cfg and the
contents of /usr/lib/zypp/plugins from the system to migrate
are available in the migration live image. The later is
implemented in this commit and Fixes #69
- Bump version: 0.5.23 → 0.5.24
- Fix pattern for initrd
Some images have an extra boot partition,
so there are grub files with '/vmlinuz'
and we need to handle that case.
- Bump version: 0.5.22 → 0.5.23
- Copy kernel and initrd for access
It copies the files in-memory so kexec can access them
once root-path gets umounted.
Fixes #65
- Bump version: 0.5.21 → 0.5.22
- Fixed dependency for reboot service
The reboot service must be called after mount-service and
after umount-service. The mount-service handles the setup
of the debug flag. If the reboot service is too fast the
debug flag setup is not respected
- Fixed logging to logfile
The setup of the logfile has to be done on each service
at import time. Each service is an extra python call
done by systemd. The setup of the logfile needs to be done
as an initializer for any unit invocation
- Bump version: 0.5.20 → 0.5.21
- Added systemctl status output to logfile
As part of the reboot service add the systemctl status information
collected up to that point into the logfile.
- Fixed log reference in console log service
The systemd unit file was still pointing to the old file
name but that has changed to var/log/distro_migration.log
- Initialize logging and debug as early as possible
The earliest opportunity to setup the log file and the
debug flag is directly after the mount-system code has
successfully mounted the target to migrate. At this point
we should init the logfile and also the debugging if
needed. The code before this commit has potential to
not even reach the log/debug setup. With this commit
the only requirement is a successful mount of the target
system.
- Bump version: 0.5.19 → 0.5.20
- Add option to handle file conflicts
In the scenario where there are packaging bugs,
this option install packages even if they
replaces files from other packages.
Fixes #58
- Fixed handling of debug flag file
If this file is present we want to stay in the migration system
no matter what happened. This is urgently required to keep us
with a way to debug the process. Current testing has shown that
only the log file is not enough to debug the complete pipeline.
- Bump version: 0.5.18 → 0.5.19
- Add flag to handle zypper migration errors
Zypper has extra error codes that does not necessarily have to
stop a distribution migration.
Fixes #52
- Bump version: 0.5.17 → 0.5.18
- Path for log file
After reboot, if the migration has failed, the file
/etc/issue has a message pointing to the log file.
The path of that log file must exist inside the rebooted system.
- Bump version: 0.5.16 → 0.5.17
- Add rootpart detection to grub activation script
The live migration image gets installed to the system again
because of the space limitation on /boot. This affects the
menuentry created on grub side in a way that we can't use
the pre-allocated pointer to the boot device but have to search
the root partition like in a real grub root entry. This patch
adds the needed code changes to locate the root part, insert
the needed filesystem module and initializes the root variable
to allow the loopback loading of the image. This Fixes #54
- Revert location change from /usr/share to /boot
This reverts commit 66dd8d4943d38f121f4b16b70bf0ab8d0b2ec82d.
If there is an extra boot partition and it's too small we
are not able to install the migration system and the customer
will not be able to use the migration concept. The image is
usually around ~300MB of size and that can often be too much
for an extra boot partition which is often designed to be small
- Bump version: 0.5.15 → 0.5.16
- Right path for debug file
Copy debug file in a different path so reboot code
can read that location in case of debugging.
- Bump version: 0.5.14 → 0.5.15
- Reboot system after migration unless debug
The migration process will reboot the system whether it has succeeded or not
unless there is a file indicating not to reboot.
Fixes #48
- Bump version: 0.5.13 → 0.5.14
- Report migration error in /etc/issue
In order to be able to reboot and still report errors in case the migration fails,
the error will be reported in a log file (/var/log/distro_migration.log).
The message and log file name to check will be indicated in /etc/issue.
Fixes #47
- Bump version: 0.5.12 → 0.5.13
- Rename migration log file
As zypper is part of the process but not the only
component, 'zypper_migration.log' does not describe it properly.
- Bump version: 0.5.11 → 0.5.12
- Change location for live migration ISO image
Instead of /usr/share expect the image in /boot. The reason
for this change is because we don't know if the system uses
an extra boot partition to load the kernel and initrd from.
However the way we add the extra loop boot entry to grub
is based on reading the value for ($root) as it was configured
on the system. The location ($root) points to in grub could
be anywhere but we can trust /boot to be in there.
This Fixes the run of the migration in Azure and also
stabilizes the concept.
- Bump version: 0.5.10 → 0.5.11
- Detection of baseproduct
Find the .prod files inside /etc/products.d
which does not contain a flavor tag.
Remove the target registration in that .prod file.
- Bump version: 0.5.9 → 0.5.10
- Revert/Refactor distro_target handling
zypper implements a handling for the distro_target attribute.
If present in the repository metadata, zypper compares the
value with the baseproduct <target> setup in /etc/products.d.
If they mismatch zypper refuses to create the repo. In the
process of a migration from distribution [A] to [B] this mismatch
always applies by design and prevents the zypper migration plugin
to work. In SCC or RMT the repositories doesn't contain the
distro_target attribute which is the reason why we don't see
this problem there. SMT however creates repos including
distro_target.
The refactored workaround solution is now to delete the target
specification in the baseproduct registration if present, because
the overlay mounting of etc/products.d did not work as it would
lead to a wrong upgrade path on response from SCC.
In addition a backup of the original products.d data is created
and used in the zypper migration plugin in case of an error
- Bump version: 0.5.8 → 0.5.9
- Added comments to explain the driver of the change
- Added product setup service
During migration etc/products is a bind mounted location
to handle the distro_target issue. At the end of a successful
migration the data written to that location must be synced
into the migrated system. This task is done by the product
service
- Handle distro_target
Long time ago zypper added a distro_target information into
the repository file and matches those with the product
information of the system. If the distro doesn't match
zypper refused to create the repository. In the migration
process using SMT this caused the zypper migration plugin
to fail because zypper never created repositories. That's
because in a migration process the repository and the
system to migrate never match. Therefore we bind mount
the /etc/products.d information from the migration live
system into the /system-root of the system to become
migrated. At the end of a successful migration the new
product information is copied to the migrated system
- Bump version: 0.5.7 → 0.5.8
- Fixed handling of os.listdir result
os.listdir only returns the names of the files in the
directory. Thus the file reference in the subsequent
copy call was wrong.
- Bump version: 0.5.6 → 0.5.7
- Import certificates
Copy certificates from /usr/share/pki/trust/anchors of the
system to become migrated into the live migration system
and update the certificate pool. This Fixes #37
- Bump version: 0.5.5 → 0.5.6
- Fixed console log service
The systemd unit file was missing an install target
- Bump version: 0.5.4 → 0.5.5
- Changed service type for console logger
Move to simple type service and set a restart policy.
The way the console logger was started before caused
a stop of the service as soon as the kernel or some
other program logs information on the console. However
during migration we want the console logger to be
actively occupy the console such that it's clear a
migration process is currently running
- Bump version: 0.5.3 → 0.5.4
- Fixed console log service
Allow to start console log at any time. Make sure it starts
after prepare but do not require prepare as it causes the
prepare service to be called again.
- Bump version: 0.5.2 → 0.5.3
- Update prepare service on hosts file
In the cloud the translation from a name into an IP might also
be configured via the static etc/hosts file. In case of SUSE's
public cloud infrastructure the connected smt server is
configured that way at registration time. For the migration
process this means that this information must be present otherwise
the host to upgrade cannot be resolved.
- Don't truncate migration log file
If the zypper based migration process runs it truncates the
so far written logfile information. We want to keep all logging
data, thus the zypper call has to append information to the
existing log file and not overwrite them.
- Fixed executable path in console log service
systemd requires an absolute path to the called program.
This patch fixes the path to the dialog program such
that systemd calls it
- Bump version: 0.5.1 → 0.5.2
- Mount kernel file systems inside /system-root
The file systems were previously mounted in grub
service but because the migration service needs to
have access proc, dev and sys inside system-root
(e.g. when updating the bootloader) they are mounted
in an earlier step. There is no need to mount them
again in grub. They are unmounted properly before
rebooting.
This Fixes #32
- Bump version: 0.5.0 → 0.5.1
- Fix log file initialization
We agreed on writing the log file into the root filesystem
of the system to migrate. This implies that the first time
to initialize this log file is in the prepare service
after the mount system service has succeeded. Calling
set_logfile in the mount system service before the system
got mounted is the wrong place. This patch fixes this
and also improves the unit test for this condition.
- Bump version: 0.4.3 → 0.5.0
- Migration file (#30)
* Add migration file
This file is used to document the migration process inside the system.
* Add logging for the services
- Require dialog package in spec file
- Added zypper migration console logging
If the migration process starts the console should show a
progress information. We use a dialog tailbox which shows
the output of the zypper migration plugin while it runs.
The output is processed using a systemd service connected
to the console. In addition the log file
var/log/zypper_migrate.log
Is created inside of the system which gets migrated. This
allows for later inspection of what the migration plugin
did. This Fixes #27
- Bump version: 0.4.2 → 0.4.3
- Fixed typo in spec file
syse vs. suse
- Bump version: 0.4.1 → 0.4.2
- Fixed spec file
Missing installation of ssh service systemd unit file
- Bump version: 0.4.0 → 0.4.1
- Provide ssh access
Copy the authorized key files into the authorized key file
of migration user to be able to access through ssh.
This checks in /home and /root paths.
Fixes #26
- Proper class name for test
- Bump version: 0.3.6 → 0.4.0
- Refactor reboot system
The system gets rebooted via kexec or if failed by a hard reboot.
For kexec it's required to load kernel, initrd and boot parameters
from the migrated system. Thus the kexec load must be done before
umount of the system and the actual reboot after umount of the
system. Therefore this patch splits the kernel-reboot service
into two services, whereas the umount service will be called
in between of them.
- Fixup ExecStart in kernel reboot service
The binary is named suse-migration-kernel-reboot not
suse-migration-kernel-load
- Bump version: 0.3.5 → 0.3.6
- Fixed removal of suse-migration-activation
A simple rpm -e call leads to an error because the package
depends on the master package providing the image. Thus it's
better to instruct zypper to remove the package including its
dependencies
- Fixed invocation of Command.run
Use of unexpected keyword argument
- Fixed kexec reboot kernel and grub lookup
In the reboot service the kernel files and the grub config
was not searched in the root of the migrated system but in
the root of the migration live system, which is the wrong
place.
- Fixed kernel reboot service
The unit requirements and dependencies were set wrong
- Bump version: 0.3.4 → 0.3.5
- Update target for uninstall
Set the target properly to uninstall package suse-migration-activation.
Fixes #17
- Bump version: 0.3.3 → 0.3.4
- Add kexec-tools (#16)
* Add kexec-tools
This is nedded for rebooting the migrated system
with the new kernel.
- Uninstall suse-migration-activation
The new grub menu should not have this entry.
This solves issue #12
- Bump version: 0.3.2 → 0.3.3
- Set the Migration boot entry to be the default
In addition set the boot timeout to 1sec
- Refactor get_cmdline
More generic parameter name and better search
of target kernel command line options.
- Bump version: 0.3.1 → 0.3.2
- Add kexec reboot service
- Added grub config extension to activate migration
Provide /etc/grub.d/99_migration plugin which causes
the creation of a Migration grub menu entry. In addition
the package build was cleaned up and extended by a new
sub-package suse-migration-activation which provides
that grub config plugin.
- Remount system root if booted via grub loopback
if the system to become migrated was booted via a grub
loopback menuentry, the disk is blocked by that readonly
loopback mount and needs to be remounted for read write
access first
- Bump version: 0.3.0 → 0.3.1
- Hotfix fstab export method
Put newline at the end of each fstab entry
- Bump version: 0.2.1 → 0.3.0
- Resolve the mount stack in reverse order
- Remove variable
- Cleanup of mounted paths
- Mount sys
- Test add entry of services calls
- Store service calls
- Make one call
- Add dependencies
- Specific service names
- Umount service must run after grub-setup service
- Refactor mount path handling
Instead of duplicating code in the cleanup service make sure
all services which mounts a location updates the mount meta
data file /etc/system-root.fstab. The cleanup service in the
end just reverse reads that file and umounts all locations
- Update grub file to migrated version
- Added umount service
The umount service cleans up the migration host such that
no active mount reference into the migrated systems exists
anymore and we are safe to reboot
- Fix typo in doc string
- Bump version: 0.2.0 → 0.2.1
- Fix agree-licenses test
- Fix agree-licenses option typo
- Bump version: 0.1.2 → 0.2.0
- Use --non-interactive flag
Instead of pre selecting a menu index use the non
interactive flag and make the code more robust
- Added zypper migration service
The service which actually runs the zypper migration plugin.
The service is called after the preparation step has completed
successfully
- Bump version: 0.1.1 → 0.1.2
- make sure to restart the network actively
- Bump version: 0.1.0 → 0.1.1
- The presence of /etc/SUSEConnect is optional
Do not fail the prepare service if there is no /etc/SUSEConnect
file available on the system to become migrated. Copy the
file if present and just continue otherwise
- Bump version: 0.0.1 → 0.1.0
- Added prepare service
The prepare service runs the preparation tasks for systemd
to perform the migration. This includes the import of the
SUSEConnect configuration from the host as well as the
bind mount of the zypp metadata
- Added setup host network service
Added service to activate the migration host system network
- Implement mount_system service
The mount_system service looks for existing disk partitions
and for an fstab file on that partitions. The first partition
found with an fstab file is considered the system to upgrade.
The fstab file is read in and mounted /system-root
in the order of the fstab entries
- Activate travis Ci
- Added command and path helper classes
</description>
</patchinfo>