Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor initialize groups tasks used for byo #3895

Merged
merged 1 commit into from
Apr 13, 2017

Conversation

mtnbikenc
Copy link
Member

Two tasks for initializing group names for the byo playbooks were located
in the common folder in the std_include.yml file. Byo dependencies
should not be in the common folder. The two tasks have been removed
from common/openshift-cluster/std_include.yml to a new file
byo/openshift-cluster/initialize_groups.yml. All references where these
tasks were included from either std_include.yml or other various files
have been updated to use the byo initialize_groups.yml. The methodology
implemented follows the pattern of having groups set up in byo then
calling out to playbooks in common, which are common to all deployments.

Entry point playbooks identified/modified in this change:

$ grep -ri --include=\*.{yml,yaml} -E 'initialize_groups\.yml'
playbooks/byo/openshift-cluster/redeploy-registry-certificates.yml:- include: initialize_groups.yml
playbooks/byo/openshift-cluster/openshift-logging.yml:- include: initialize_groups.yml
playbooks/byo/openshift-cluster/redeploy-certificates.yml:- include: initialize_groups.yml
playbooks/byo/openshift-cluster/enable_dnsmasq.yml:- include: initialize_groups.yml
playbooks/byo/openshift-cluster/redeploy-master-certificates.yml:- include: initialize_groups.yml
playbooks/byo/openshift-cluster/redeploy-router-certificates.yml:- include: initialize_groups.yml
playbooks/byo/openshift-cluster/redeploy-etcd-certificates.yml:- include: initialize_groups.yml
playbooks/byo/openshift-cluster/config.yml:- include: initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/docker/upgrade.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade_nodes.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_control_plane.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade_nodes.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade_control_plane.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade_nodes.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade_control_plane.yml:- include: ../../initialize_groups.yml
playbooks/byo/openshift-cluster/upgrades/upgrade_etcd.yml:- include: ../initialize_groups.yml
playbooks/byo/openshift-cluster/redeploy-openshift-ca.yml:- include: initialize_groups.yml
playbooks/byo/openshift-cluster/redeploy-node-certificates.yml:- include: initialize_groups.yml
playbooks/byo/openshift-node/scaleup.yml:- include: ../openshift-cluster/initialize_groups.yml
playbooks/byo/openshift-node/restart.yml:- include: ../openshift-cluster/initialize_groups.yml
playbooks/byo/openshift-master/scaleup.yml:- include: ../openshift-cluster/initialize_groups.yml
playbooks/byo/openshift-master/restart.yml:- include: ../openshift-cluster/initialize_groups.yml
playbooks/byo/openshift_facts.yml:- include: openshift-cluster/initialize_groups.yml
playbooks/byo/rhel_subscribe.yml:- include: openshift-cluster/initialize_groups.yml
playbooks/byo/openshift-etcd/restart.yml:- include: ../openshift-cluster/initialize_groups.yml

@mtnbikenc
Copy link
Member Author

aos-ci-test

@openshift-bot
Copy link

error: aos-ci-jenkins/OS_3.6_containerized for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_NOT_containerized, aos-ci-jenkins/OS_3.5_NOT_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_containerized, aos-ci-jenkins/OS_3.5_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

error: "aos-ci-jenkins/OS_3.5_containerized, aos-ci-jenkins/OS_3.5_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

error: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

error: "aos-ci-jenkins/OS_3.5_NOT_containerized, aos-ci-jenkins/OS_3.5_NOT_containerized_e2e_tests" for 3af30f5 (logs)

@mtnbikenc mtnbikenc requested a review from kwoodson April 11, 2017 14:36
Copy link
Contributor

@kwoodson kwoodson left a comment

Choose a reason for hiding this comment

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

Great work here Russell.

Any thoughts on having a role create the groups instead of a playbook? It doesn't offer us much in terms of playbook vs role and code refactor other than it might be nice to encapsulate the work under a role. It feels like a function call.

Thoughts?

I will not block as I see this as awesome work! big 👍

- name: Evaluate group l_oo_all_hosts
add_host:
name: "{{ item }}"
groups: l_oo_all_hosts
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the significance of putting l_ on this variable? This is for my own sake. I've seen this pattern used else where in this repo.

I generally shy away from naming variables with l as it appears to the viewer as l, L, |, or even 1.

Copy link
Member

Choose a reason for hiding this comment

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

local, something internal to the role that one should never expect to set from the outside

Copy link
Contributor

@kwoodson kwoodson Apr 11, 2017

Choose a reason for hiding this comment

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

@sdodson, thanks for the explanation. The irony of it is, if its internal to a role, then why are we in a playbook defining it? At that point it becomes global. Its fine for now but I'd prefer if we moved away from l_. I'd prefer group_ or something that denotes our intention.

Copy link
Member Author

Choose a reason for hiding this comment

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

@kwoodson From what I've been able to dig out, the l_oo_all_hosts group was supposed to be something that was only referenced in the original playbook for creating the all g_ group names, which are then processed into the oo_ group names. The group name initialization process is something I have a card for to come back to. I've found where this l_oo_all_hosts group name has been used in other places, outside of the original playbook (probably by mistake), which should be corrected.

Copy link
Contributor

Choose a reason for hiding this comment

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

@sdodson @mtnbikenc, Thanks for the explanations.

@mtnbikenc
Copy link
Member Author

aos-ci-test

@mtnbikenc
Copy link
Member Author

[merge]

@openshift-bot
Copy link

[test]ing while waiting on the merge queue

@openshift-bot
Copy link

error: aos-ci-jenkins/OS_3.6_containerized for 3af30f5 (logs)

@openshift-bot
Copy link

error: aos-ci-jenkins/OS_3.5_NOT_containerized for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_containerized, aos-ci-jenkins/OS_3.5_containerized_e2e_tests" for 3af30f5 (logs)

@kwoodson
Copy link
Contributor

aos-ci-test

@kwoodson
Copy link
Contributor

flake openshift/origin#13271

@kwoodson
Copy link
Contributor

aos-ci-test

@kwoodson
Copy link
Contributor

[merge]

@openshift-bot
Copy link

error: aos-ci-jenkins/OS_3.6_containerized for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_NOT_containerized, aos-ci-jenkins/OS_3.5_NOT_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_containerized, aos-ci-jenkins/OS_3.5_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

error: aos-ci-jenkins/OS_3.6_containerized for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_NOT_containerized, aos-ci-jenkins/OS_3.5_NOT_containerized_e2e_tests" for 3af30f5 (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_containerized, aos-ci-jenkins/OS_3.5_containerized_e2e_tests" for 3af30f5 (logs)

@mtnbikenc
Copy link
Member Author

Flake openshift/origin#13108

@mtnbikenc
Copy link
Member Author

Last test failed because of Ansible 2.3 being used for unit testing. Fixed in #3915. Trying again.

[merge]

@mtnbikenc
Copy link
Member Author

@sdodson can you re-trigger the test?

Two tasks for initializing group names for the byo playbooks was located
in the common folder in the std_include.yml file.  Byo dependencies
should not be in the common folder.  The two tasks have been removed
from common/openshift-cluster/std_include.yml to a new file
byo/openshift-cluster/initialize_groups.yml.  All references where these
tasks were included from either std_include.yml or other various files
have been updated to use the byo initialize_groups.yml.  The methodology
implemented follows the pattern of having groups set up in byo then
calling out to playbooks in common, which are common to all deployments.
@mtnbikenc
Copy link
Member Author

aos-ci-test

@openshift-bot
Copy link

Evaluated for openshift ansible merge up to 558796b

@openshift-bot
Copy link

Evaluated for openshift ansible test up to 558796b

@openshift-bot
Copy link

error: aos-ci-jenkins/OS_3.6_containerized for 558796b (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_NOT_containerized, aos-ci-jenkins/OS_3.5_NOT_containerized_e2e_tests" for 558796b (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.6_NOT_containerized, aos-ci-jenkins/OS_3.6_NOT_containerized_e2e_tests" for 558796b (logs)

@openshift-bot
Copy link

success: "aos-ci-jenkins/OS_3.5_containerized, aos-ci-jenkins/OS_3.5_containerized_e2e_tests" for 558796b (logs)

@openshift-bot
Copy link

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_openshift_ansible/24/) (Base Commit: 2942b03)

@openshift-bot
Copy link

openshift-bot commented Apr 12, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_openshift_ansible/216/) (Base Commit: eb50698)

@openshift-bot openshift-bot merged commit 92723e8 into openshift:master Apr 13, 2017
@mtnbikenc mtnbikenc deleted the playbook-refactor branch April 13, 2017 12:10
@ingvagabund ingvagabund mentioned this pull request May 23, 2017
21 tasks
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.

4 participants