Merge lp://staging/~lmic/charms/trusty/galera-cluster/galera-cluster+source-galera-config-option into lp://staging/charms/trusty/galera-cluster

Proposed by Larry Michel
Status: Merged
Merge reported by: Adam Israel
Merged at revision: not available
Proposed branch: lp://staging/~lmic/charms/trusty/galera-cluster/galera-cluster+source-galera-config-option
Merge into: lp://staging/charms/trusty/galera-cluster
Diff against target: 67 lines (+27/-5)
2 files modified
config.yaml (+9/-1)
hooks/galera_hooks.py (+18/-4)
To merge this branch: bzr merge lp://staging/~lmic/charms/trusty/galera-cluster/galera-cluster+source-galera-config-option
Reviewer Review Type Date Requested Status
Adam Israel (community) Approve
Tim Van Steenburgh (community) Needs Information
Review via email: mp+270714@code.staging.launchpad.net

Description of the change

This adds source-galera as config option which is used to specify galera specific repository in addition to source which would point to a cloud archives. This deals with the case where cloud archives used for an OpenStack deployment does not yet have the galera-cluster bits and prevents the installation of galera-cluster.

To post a comment you must log in.
Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

Hi Larry, please see my question/comment left inline.

review: Needs Information
Revision history for this message
Larry Michel (lmic) wrote :

Thanks Tim for review. I agree with you that if source is set and source-galera is not set, then both routines get called. This is fixed with your suggested change.

Revision history for this message
Larry Michel (lmic) wrote :

Hi Tim, I initially pushed the change but ran into test failures so I had to back it out.

The initial intent for adding source-galera was to have it duplicate the behavior for source, and a value for source would still be added as an extra archive. In our bundles, source=<cloud archives>, source-galera=None, therefore both <cloud archives> and galera cluster archives are added.

Your proposed fix preserves old source behavior completely by forcing user to use source or source-galera and not both. Hence, source-galera has to be set for us, otherwise only <cloud-archive> is added which is the original problem we ran into and that's what broke the tests.

To unblock this review, I've created a separate branch that we'll use until we are able to update the environment with the fix that will set source-galera option in our bundles.

Revision history for this message
Tim Van Steenburgh (tvansteenburgh) wrote :

@Larry, to clarify, would like me to review/merge this as-is, or do you have another commit coming?

Revision history for this message
Larry Michel (lmic) wrote :

Tim, it was initially ready for review, but I found that the charm also needed to the key passed in as an option when doing add_source(). The package were failing authentication with the optional key being passed in. So I am pushing branch with this new option.

I also found that the mysql issue is more of a race condition whereas there seems to be a small window following the restart when mysql is not quite ready for configuration commands. With a simple time.sleep(1) before configuring the sst user password following the restart, I was able to test over the weekend that the issue does not get recreated. Note that I was able to verify through service_running() that issue MySQL is in the running state as expected following service_restart().

I included that fix in this branch but if you'd rather see a separate MP, I can back it out and submit the MP through a separate branch.

There won't be additional commit, so please go ahead and review when possible.

Revision history for this message
Larry Michel (lmic) wrote :

Correction: The packages were failing authentication "without" the optional key being passed in.

64. By Larry Michel <email address hidden>

add source-galera-key opton and retry for sst user's password config

Revision history for this message
Adam Israel (aisrael) wrote :

Hi Larry,

The changes you've made here look good to me. +1

review: Approve
Revision history for this message
Larry Michel (lmic) wrote :

Hi Adam, Thanks for the review.

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

to all changes: