Merge lp:~dbuliga/charm-helpers/charm-helpers into lp:charm-helpers

Proposed by Denis Buliga
Status: Merged
Merged at revision: not available
Proposed branch: lp:~dbuliga/charm-helpers/charm-helpers
Merge into: lp:charm-helpers
Diff against target: 0 lines
To merge this branch: bzr merge lp:~dbuliga/charm-helpers/charm-helpers
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+285044@code.launchpad.net

Description of the change

Considering that now there is CentOS support in Juju, it would be great to also support this platform in charmhelpers. As a result, this branch attempts to add cross platform support for RPM based systems, with CentOS as the first such OS.

This branch introduces a factory that based on platform, loads the proper functionality for that platform. There is currently a module "ubuntu", which is basically the old code moved into its own submodule, and a "centos" which implements the same functionality. The factory itself defines a number of functions that are common between the 2 OSs. For backwards compatibility, it also does a:

from .ubuntu import *

So you still get the same behavior as you previously did. So far only 2 modules have been touched by this branch: core and fetch. Most of the others are not really needed for basic charm building (contrib/openstack for example)

There was the need of a method in charmhelpers/__init__.py which returns the current platform. It is called "get_platform" and returns at the moment a string "ubuntu" when the platform is Ubuntu, and "centos" when the platform is CentOS. These strings are used to determine in which folder the code should look for the methods.

The need of changing methods name in fetch appeared because, in CentOS it was not feasible to have methods with name such as: (apt_install for example)
It will be easier to transition charms from using functions like: "apt_install" to just "install". More than this, at the bottom of the fetch/__init__.py there are some aliases created for backwards compatibility.

To post a comment you must log in.
526. By Liam Young

[ajkavanagh, r=gnuoy] Mod to charmhelpers.contrib.python.packages to stop importing pip from
adding wheels to the path.

527. By Marco Ceppi

Corrected the license

528. By James Page

midonet: select the right Neutron plugin OS >= liberty

529. By James Page

Support keyid or embedded key when configuring sources.

530. By Liam Young

[gnuoy, r=wolsen] Add support for keystone v3

531. By Liam Young

[ajkavanagh, r=thedac,gnuoy] Add service running and ports open checks to set_os_workload_status()
  This adds optional checks to the set_os_workload_status(...) function to
  make sure that the services that the charm says should be running are
  actually running (according to service_running()) and also, optionally,
  that the ports that are supposed to be open are open (on 0.0.0.0) and
  have something listening to them.

532. By James Page

Drop check on midonet-origin - for liberty we always need networking-midonet

Revision history for this message
Charles Butler (lazypower) wrote :

Greetings Denis,

Thanks for this massive contribution to charm-helpers! I've taken some time to look this over and I really like your approach to abstracting the distro's nuances. I'm pretty happy with how you've done this, and would ideally like to see unit tests bundled with a change this large.

However that being said, this looks like some great work. I additionally like how you've maintained backwords compat while this settles out and starts to land. Approving this MP today would potentially disrupt a lot of work going on with the rest of the ecosystem, so I'll leave my +1 and have someone else come by to take a look at the merge.

Thanks again for being patient and making such a great contribution! We really appreciate it.

If you have any questions/comments/concerns about the review contact us in #juju on irc.freenode.net or email the mailing list <email address hidden>, or ask a question tagged with "juju" on http://askubuntu.com.

533. By James Page

Add a remove erasure profile function.

Fix up a few type related bugs.

534. By James Page

Update driver details for PLUMgrid >= liberty

535. By James Page

Fix SSL cipher suites to enforce TLS v1 or better.

536. By James Page

ceph: support use of monitor cluster as a key/value store

537. By James Page

Add support for Juju 2.0 network spaces

Juju 2.0 adds a new hook tool called network-get to query for network
information for named relations and extra-bindings.

Add basic hook tool support and associated unit tests.

538. By Charles Butler

  [r,a=lazypower] Chris Holcombe 2016-03-04 Typo in the ceph config-key commands. This removes the extra ceph parameter that should not be there

539. By Liam Young

[ajkavanagh, r=gnuoy] Support pause/resume functionality for OpenStack charms. Pause and resume are baked into set_os_workload_status() and also perform additional checks using service_running() and port listening checks.

540. By Liam Young

[gnuoy, trivial] whitespace lint fix

541. By Liam Young

[ajkavanagh, r=gnuoy] Fixes broken *_unit_paused_set() functions in contrib/openstack/utils.py that were merged by mistake.

Also fixes some PEP8 formatting in the utils.py and test_openstack_utils.py files (line lengths).

542. By James Page

Enable Keystone v3 api in amulet

543. By Marco Ceppi

[marcoceppi] Support resource-get command

544. By Marco Ceppi

version bump

545. By James Page

[trivial] Add swift 2.6.0 to the openstack mitaka series

546. By James Page

Ensure that keystone api version defaults to 2, not 3

This resolves a number of amulet test failures after resyncs of the
keystone v3 testing support.

547. By Charles Butler

  [r,a=lazypower] Chris Holcombe 2016-03-09 Ceph command should really be rados command for the flush cache tier

548. By Liam Young

[ajkavanagh, r=gnuoy] Fix lp:1555643 - c.o.amulet.utils imports removed novaclient.v1_1 module

  As per http://docs.openstack.org/developer/python-novaclient/api.html
  the novaclient module needs to be imported as:

  from novaclient import client
  c = client.Client(VERSION, ...)

  as opposed to

  from novaclient.VERSION import client
  c = client.Client(...)

549. By Liam Young

[gnuoy, r=wolsen] The settings in keystone_authtoken do not depend on keystone api version in releases over > juno. See details in Bug #1557223

550. By Liam Young

[wolsen, hopem, r=gnuoy] This merge proposal adds the base for hardening the host OS and SSH as utility libraries which can be imported into any charm. This also adds the stubs for MySQL and Apache, which will come in later merge proposals.

The hardening efforts are based on the upstream hardening.io project, which can be found at http://hardening.io.

551. By Liam Young

[gnuoy, trivial] lint fix

552. By Charles Butler

  [r=lazypower] Chris Holcombe 2016-03-18 Add parameters to the run action utility in amulet

553. By Liam Young

[hopem, r=gnuoy] contrib.hardening fixups (mostly unit test fixes)

554. By Edward Hope-Morley

[trivial] contrib.hardening default use_pam=no

555. By Charles Butler

[r=beisner,a=lazypower] Anton Skriptsov 2016-03-22 add NexentaEdge's charms to no_origin list

556. By David Ames

[jamespage, r=thedac] Add extra-binding awareness to openstack api endpoint resolver

557. By James Page

Add InternalEndpointContext to contrib.openstack.context

558. By Edward Hope-Morley

[gnuoy,r=hopem]

When checking if a System V service is running, query
service --all-status which keeps track of the services
and their return codes.

Closes-Bug: 1564842

559. By David Ames

[thedac, r=jamespage] Apparmor context class for OpenStack charms

The class will validate aa-profile-mode config settings and either set
the profile to enforce, complain or disable.

560. By David Ames

[coreycb, r=thedac] Add support for keystone liberty release 8.1.0

561. By David Ames

[jamespage, r=thedac] Add support for specifying the datapath type of an ovs bridge

562. By Ryan Beisner

[chris.macnaughton, r=1chb1n] Allow the validate_unit_process_ids test helper to accept a list of valid values

563. By Ryan Beisner

[chris.macnaughton, r=1chb1n] Trivial lint fix

564. By James Page

Allow custom functions to be used to restart services in the restart_on_change functions.

565. By James Page

[trivial] Add 2.7.0 to the list of swift mitaka releases.

566. By Ryan Beisner

[xfactor973, r=1chb1n] Add the final update_pool call in Ceph pool creation to set the replica count (bug 1565120)

567. By Ryan Beisner

[xfactor973, r=1chb1n] Add mandatory flag for ceph jewel and above

568. By Liam Young

[gnuoy, r=james-page] Add openstack mitaka compatible template for keystone-authtoken

569. By Edward Hope-Morley

[hopem,r=gnuoy]

Fix contib.storage.linux.ceph pool_exists()
Partially-Closes-Bug: 1572506

570. By James Page

Switch is_device_mounted to use lsblk

This will correct detect a wider range of 'is use' states compared
to parsing the output of /proc/mounts, including block devices that
are part of LVM volumes.

571. By James Page

Add support for mitaka/neutron 8.1.x series

572. By David Ames

[thedac,r=tinwood] Actively check for stopped message(s) in service_running

573. By James Page

Fix ipv6 address recongition under xenial.

574. By James Page

Refactor service_running to determine init approach

Use of "service --status-all" has some challenges on trusty where
a recent lsb-base update resulted in all calls being diverted to
upstart, where return codes for non-running daemons are still 0.

Detect whether to use upstart or the base init.d script to
determine whether a service is running, and look at either the
upstart output, or for a non-zero return code from an init.d
status call.

575. By James Page

Add support for generation of systemd unit files for OpenStack
deploy from source.

576. By James Page

Add support for Netwon and Ocata OpenStack release

Drop back to matching major versions only for projects that use semantic versioning.

577. By Edward Hope-Morley

[hopem,r=jamespage]

Add CephConfContext to contrib.storage.linux.ceph

Also moved contrib.openstack.context.config_flags_parser to
contrib.openstack.utils and created contrib.openstack.exceptions
Related-Bug: 1522375

578. By James Page

Add support for fallback matching on major.minor version for Swift

This allows trunk package builds to be used with the charms.

579. By James Page

Ensure is_ip detects both IPv4 and IPv6 addresses

580. By Edward Hope-Morley

[trivial] context should use set().difference not set().symmetric_difference when validating keys

Preview Diff

Empty

Subscribers

People subscribed via source and target branches