Merge lp://qastaging/~ajkavanagh/charm-helpers/ppc64le_proposed_fix_plus_refactor into lp://qastaging/charm-helpers

Proposed by Alex Kavanagh
Status: Merged
Merged at revision: 747
Proposed branch: lp://qastaging/~ajkavanagh/charm-helpers/ppc64le_proposed_fix_plus_refactor
Merge into: lp://qastaging/charm-helpers
Diff against target: 3646 lines (+1603/-1375)
11 files modified
Makefile (+1/-0)
charmhelpers/__init__.py (+61/-0)
charmhelpers/contrib/openstack/utils.py (+78/-142)
charmhelpers/fetch/__init__.py (+17/-9)
charmhelpers/fetch/centos.py (+1/-1)
charmhelpers/fetch/ubuntu.py (+245/-57)
tests/contrib/openstack/test_openstack_utils.py (+163/-112)
tests/contrib/openstack/test_os_utils.py (+1/-1)
tests/fetch/test_fetch.py (+9/-1053)
tests/fetch/test_fetch_centos.py (+315/-0)
tests/fetch/test_fetch_ubuntu.py (+712/-0)
To merge this branch: bzr merge lp://qastaging/~ajkavanagh/charm-helpers/ppc64le_proposed_fix_plus_refactor
Reviewer Review Type Date Requested Status
Ryan Beisner Pending
James Page Pending
Review via email: mp+322308@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2016-08-21.

Description of the change

  Refactor configure_installation_source() and add_source() + fix bug 1611134

  Bug#1611134: fetch helper assumes amd64 arch (cannot use with ports such as ppc64el)

  The refactor is because the two functions do almost exactly the same thing in two
  different places, and the core function does OpenStack sources, which ought to be in
  the contrib/openstack module set.

  After the refactor, the bug fix was implemented on the 'proposed' source to pick the
  correct ports specification for ppc64le:

  deb http://ports.ubuntu.com/ubuntu-ports {}-proposed main universe multiverse restricted

  where {} is the ubuntu release.

To post a comment you must log in.
Revision history for this message
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal

As you might expect, there are a number of (what seem to be small) merge conflicts with Trunk by now. But I merged this into a local copy of Trunk, took a stab at resolving those conflicts, and found the following issues:

1. Some of the added tests appear to assume that the tests will be executed from a Xenial machine, which will not always be the case. It might be best to base the tests on Xenial (LTS) regardless of the release of the developer's machine which is executing the unit tests.

2. There are a number of "local variable 'env' referenced before assignment" errors in the tests which cover _run_apt_command. This may have been missed with the rebase against that big centos change. This is causing unit and lint check failures.
| charmhelpers/fetch/ubuntu.py:642:57: F821 undefined name 'env'

3. There has been a recent change in the apt retry logic which needs to be reconciled on a rebase. I didn't fully (or carefully) resolve those conflicts in my WIP as I needed to plow on for a separate test case.

http://bazaar.launchpad.net/~charm-helpers/charm-helpers/devel/revision/705

This is causing:
| charmhelpers/fetch/ubuntu.py:645:34: F821 undefined name 'APT_NO_LOCK_RETRY_COUNT'
| charmhelpers/fetch/ubuntu.py:649:29: F821 undefined name 'APT_NO_LOCK_RETRY_DELAY'
| charmhelpers/fetch/ubuntu.py:650:28: F821 undefined name 'APT_NO_LOCK_RETRY_DELAY'

See nosetests results:
 - http://paste.ubuntu.com/24278293/

My temporary trunk merge branch is here (NOT intended to land or to be proposed as my merge conflict resolution approach was quite fast and furious):
 - https://code.launchpad.net/~1chb1n/charm-helpers/lp1611134

I synced it into the nova-compute charm as a WIP TEST here (also NOT for reals):
 - https://github.com/ryan-beisner/charm-nova-compute-wip

And that is what I'm using on arm64 at the moment (!), because I need to consume arm64 ports. I'll chime back in here with how that goes. :-)

review: Needs Fixing
Revision history for this message
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal

A test deployment on arm64 xenial-mitaka, with openstack-origin set to "distro-proposed" failed:

2017-03-30 03:05:04 DEBUG juju-log No hardening applied to 'install'
2017-03-30 03:05:05 INFO juju-log DEPRECATION WARNING: Function configure_installation_source is being removed on/around 2017-07 : use charmhelpers.fetch.add_source() instead.
2017-03-30 03:05:05 ERROR juju-log FATAL ERROR: Arch aarch64 not supported for (distro-)proposed
2017-03-30 03:05:05 ERROR juju.worker.uniter.operation runhook.go:107 hook "install" failed: exit status 1

review: Needs Fixing
Revision history for this message
Ryan Beisner (1chb1n) wrote : Posted in a previous version of this proposal

FYI, this (in my WIP temp branch) resolved the failure in my previous comment:
 - http://bazaar.launchpad.net/~1chb1n/charm-helpers/lp1611134/revision/729

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote : Posted in a previous version of this proposal

Hi Ryan

Thanks for taking a look at it. I'm going to swing back to this shortly and have another go at bring it up to date. I'll also test it against the glance charm to check that it does indeed work.

Thanks
Alex.

643. By Alex Kavanagh

Add ARM 64 arch to proposed pockets for OpenStack

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches