Skip to content

Native Support for Multi-Master HA - #608

Merged
brenton merged 12 commits into
openshift:masterfrom
abutcher:native-ha
Nov 5, 2015
Merged

brenton merged 12 commits into
openshift:masterfrom
abutcher:native-ha

Conversation

@abutcher

Copy link
Copy Markdown
Member

Builds on #502 and has been rebased to target the master branch.

@liggitt

liggitt commented Oct 16, 2015

Copy link
Copy Markdown
Contributor

For HA, oauthConfig.sessionConfig.sessionSecretsFile must be set to a shared secret so that sessions work across masters. See https://docs.openshift.org/latest/admin_guide/configuring_authentication.html#session-options

@jarovo

jarovo commented Oct 20, 2015

Copy link
Copy Markdown
Contributor

Can one of the admins verify this patch?

@jarovo

jarovo commented Oct 21, 2015

Copy link
Copy Markdown
Contributor

Can one of the admins verify this patch?

@abutcher

Copy link
Copy Markdown
Member Author

@liggitt I've added session secret configuration in 4e42db4. Can you make sure that is a sane approach to generating/configuring secrets?

Here's an example w/ generated secrets. The number of generated secrets is configurable and the secrets can be overridden.

apiVersion: v1
kind: SessionSecrets
secrets:
- authentication: hm6dGcVNPzBndcIcP3qaYCeNYeevUDRr
  encryption: vRCuCqRm8eLGnoM34P5BxJCk3HuJXk/l

@abutcher

Copy link
Copy Markdown
Member Author

@liggitt Comments addressed in 63eacb7 - afaik we haven't validated inputs unless we're checking for required variables.

@abutcher
abutcher force-pushed the native-ha branch 2 times, most recently from e077012 to feb04ca Compare October 27, 2015 13:05
@abutcher

Copy link
Copy Markdown
Member Author

@liggitt Few updates in feb04ca. Corrected inventory docs for secret length. The master playbook will fail when one session secret variable is set and the other isn't and if they're set and not equal length.

@liggitt

liggitt commented Oct 27, 2015

Copy link
Copy Markdown
Contributor

great, thanks

@abutcher
abutcher force-pushed the native-ha branch 7 times, most recently from 5286996 to 73ee4a5 Compare November 3, 2015 00:41
@abutcher abutcher changed the title WIP Native Support for Multi-Master HA Native Support for Multi-Master HA Nov 3, 2015
@miminar

miminar commented Nov 3, 2015

Copy link
Copy Markdown

I haven't found any issues so far. Tested with 3 machines (each running os-node and etcd, 2 running os-master and the other ha-proxy). Tested with deployment_type == 'openshift-enterprise'.

Well, I reported few issues, but they concerned general ansible installation.

@abutcher

abutcher commented Nov 5, 2015

Copy link
Copy Markdown
Member Author

ok to test

@abutcher

abutcher commented Nov 5, 2015

Copy link
Copy Markdown
Member Author

Pacemaker now uses the regular unit files again.

I've tested this branch with:

  • Single master 3.0
  • Single master 3.1
  • Multi-master pacemaker 3.0
  • Multi-master pacemaker 3.1
  • Multi-master native 3.0
  • Multi-master native 3.1
  • Multi-master pacemaker 3.0 master branch with a subsequent run with this branch.

@brenton If you can verify a 3.0 regression I think this is safe to merge. #796 is required for 3.0 multi-master in my testing.

@brenton

brenton commented Nov 5, 2015

Copy link
Copy Markdown
Contributor

I locally merged this PR on top of master and I'm hitting this:

TASK: [openshift_master | fail ] **********************************************
fatal: [ose3-master.example.com] => error while evaluating conditional: openshift_master_ha | bool and openshift_master_cluster_ha is not defined or (openshift_master_cluster_ha != "pacemaker" or not openshift_master_cluster_ha != "native")

FATAL: all hosts have already failed -- aborting

@abutcher

abutcher commented Nov 5, 2015

Copy link
Copy Markdown
Member Author

@brenton Oof. Changed to this and it continues for single and fails for multi when openshift_master_cluster_ha is unset or incorrect.

- fail:                                                                                                                                                                                                            
    msg: "openshift_master_cluster_ha must be set to either 'native' or 'pacemaker' for multi-master installations"                                                                                                
  when: openshift_master_ha | bool and ((openshift_master_cluster_ha is not defined) or (openshift_master_cluster_ha is defined and (openshift_master_cluster_ha != "native" and openshift_master_cluster_ha != "pacemaker")))

@detiber

detiber commented Nov 5, 2015

Copy link
Copy Markdown
Contributor

@abutcher I don't think we should allow a native ha install for 3.0, since we have not supported it in the past and it hasn't been tested by QE.

@abutcher

abutcher commented Nov 5, 2015

Copy link
Copy Markdown
Member Author

@detiber Added a fail for 3.0 native.

@abutcher

abutcher commented Nov 5, 2015

Copy link
Copy Markdown
Member Author

@detiber and name swapped s/cluster_ha/cluster_method/. Squashed top commits.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this workaround and these templates? I thought were were going to move them to packaging...

@sdodson ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to, it just hasn't gotten done. I'd like to figure out a way that starting 'atomic-openshift-master' either starts the single master service or api + controllers depending on what your deployment is. Perhaps with a drop file that determines which child services to start when you start atomic-openshift-master?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And master-single-service is mutually exclusive with master-api-servers + master-controllers

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If/when these change we'll need to do some magic with the pacemaker upgrade to update the master service resource.

@brenton

brenton commented Nov 5, 2015

Copy link
Copy Markdown
Contributor

My regression testing for 3.0 is now passing. @abutcher is this ready on your end?

@abutcher

abutcher commented Nov 5, 2015

Copy link
Copy Markdown
Member Author

@brenton :shipit:

brenton added a commit that referenced this pull request Nov 5, 2015
Native Support for Multi-Master HA
@brenton
brenton merged commit c73ec7b into openshift:master Nov 5, 2015
@abutcher
abutcher deleted the native-ha branch November 5, 2015 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants