Created by Ryan Harper on 2017-09-15 and last modified on 2017-09-15
Get this branch:
bzr branch lp:~raharper/curtin/trunk.add-syslog-handler
Only Ryan Harper can upload to this branch. If you are Ryan Harper please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Ryan Harper

Recent revisions

527. By Ryan Harper on 2017-09-15

log: always write to syslog

526. By Ryan Harper on 2017-09-12

install: ensure iscsi service is running to handle shutdown properly

In some cases it is problematic to shutdown the iscsi targets (like raid
over iscsi). Instead of introducing extra work to stop multi-layer
storage devices during the install of curtin, this patch addresses the
core issue around iscsi termination; ensuring the iscsi service is active
prior to shutting down. In Artful, the open-iscsi service does not
automatically start if iscsi configuration is not present during boot;
curtin will restart/start the service if the storage configuration
contains iscsi disks.

This approach successfully passes all of the iscsi configurations
(plain, lvm over iscsi, and raid over iscsi).

525. By Ryan Harper on 2017-09-07

mdadm: handle write failures to sysfs entries when stopping mdadm

mdadm_stop command tries a number of methods to stop an existing
array. Writes to sysfs fail differently, this patch catches both
IOErrors and OSErrors when writing to sysfs entries, logs and continues
with the stop operation.

Updating the LVM over RAID vmtest to run in dirty_disk mode reproduces
a failure reported and is resolved with this branch.

LP: #1708052

524. By Joshua Powers on 2017-09-01

vmtest: catch exceptions in curtin-log-print

Wraps the calling of curtin-log-print to catch any exceptions
that result. Was causing large image files to be left behind as
an exception generated by the curtin-log-print prevented proper

LP: #1714592

523. By Ryan Harper on 2017-09-01

iscsi: use curtin storage config to disconnect iscsi targets

When curtin disconnects from iscsi targets after an install, it does so
after unmounting the targets, however it passed the target dir into the
iscsi disconnect code which then silently failed to find any
session configurations.

We've been lucky as the existing shutdown iscsi service has been
logging out of sessions defined on the host; however on recent
Artful systems, the open-iscsi service is not restarted after
populating /etc/iscsi/nodes directory and since it is not running
in the ephemeral environment the service will not automatically
stop the iscsi devices, causing a hang on shutdown.

To resolve this parse the curtin storage config for iscsi disks,
construct IscsiDisk objects and then call their disconnect() method.
In addition to this logic fix, this branch contains:

- adds a missing Artful LVM Iscsi vmtest class
- Updated logging messages in iscsi paths, including
  a message when iscsi_disconnect doesn't find the
  /etc/iscsi/nodes directory.
- Updated IscsiDisk disconnect with similar logging

522. By Ryan Harper on 2017-08-22

vmtests: bump skip_by_date values out to give cloud-init SRU more time

521. By Scott Moser on 2017-08-15

vmtest: get info about collected symlinks and then delete them.

Some of the 'collect' scripts collect files with 'cp -a' or other
means that would collect a symbolic link. Since none of our
scripts yet handle properly resolving absolute symlinks we just
remove all symlinks and write a file 'symlinks.txt' with info about them.

At a later date we might need to also clean out sockets or other content.

The primary motivation for this is to
a.) make sure tests don't inadvertantly read the target of the symlink
    and thus "verify" files on the host
b.) jenkins can produce a zip file of the artifacts, and we suspect that
    it is bothered by the symbolic links.

520. By Ryan Harper on 2017-08-10

Update network cloud-init related skiptest dates, SRU still pending

Move skipdate to 2017-08-20 to allow more time for cloud-init SRU to land.

519. By Chad Smith on 2017-08-03

tests: Add CiTestCase common parent for all curtin tests.

This branch makes sure all unittests subclass from CiTestCase which
provides all unit tests with a tmp_dir and tmp_path creation. Drop
unittest-specific tempfile usage in favor of self.tmp_dir and

Adding this parent class gives us a single place to add test methods which
have general application across unit tests, like log tracking and tmp
directory cleanup.

518. By Ryan Harper on 2017-08-03

vmtests: Remove force flag for centos curthooks

During development, and before our source images had updated
curtin hooks we needed this flag to push test installations down
the new code path.

We've left it present for future development needs.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
This branch contains Public information 
Everyone can see this information.