Bug 1235953 - The region and zone label entries don't get assigned to the node by the ansible installer even if the entries are made in the /etc/ansible/hosts
Summary: The region and zone label entries don't get assigned to the node by the ansib...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: Ma xiaoqiang
URL:
Whiteboard:
: 1239034 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-26 07:56 UTC by Miheer Salunke
Modified: 2019-08-15 04:47 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-06 09:41:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miheer Salunke 2015-06-26 07:56:43 UTC
Description of problem:


The region and zone label entries don't get assigned to the node by the ansible installer even if the entries are made in the /etc/ansible/hosts

Raw

[root@ose3-master ~]# oc get nodes
NAME                      LABELS                                           STATUS
ose3-master.example.com   kubernetes.io/hostname=ose3-master.example.com   Ready
ose3-node1.example.com    kubernetes.io/hostname=ose3-node1.example.com    Ready
ose3-node2.example.com    kubernetes.io/hostname=ose3-node2.example.com    Ready


Version-Release number of selected component (if applicable):
3.0

How reproducible:
Always

Steps to Reproduce:
1. Add the following in /etc/ansible/hosts
=============================================================
# This is an example of a bring your own (byo) host inventory

# Create an OSEv3 group that contains the masters and nodes groups
[OSEv3:children]
masters
nodes

# Set variables common for all OSEv3 hosts
[OSEv3:vars]
# SSH user, this user should allow ssh based auth without requiring a password
ansible_ssh_user=root

# If ansible_ssh_user is not root, ansible_sudo must be set to true
#ansible_sudo=true

# To deploy origin, change deployment_type to origin
deployment_type=enterprise

# Pre-release registry URL
#openshift_registry_url=docker-buildvm-rhose.usersys.redhat.com:5000/openshift3_beta/ose-${component}:${version}

# Pre-release additional repo
#openshift_additional_repos=[{'id': 'ose-devel', 'name': 'ose-devel', 'baseurl': 'http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/3.0/latest/RH7-RHOSE-3.0/$basearch/os', 'enabled': 1, 'gpgcheck': 0}]
#openshift_additional_repos=[{'id': 'ose-devel', 'name': 'ose-devel', 'baseurl': 'http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterpriseErrata/3.0/latest/RH7-RHOSE-3.0/$basearch/os', 'enabled': 1, 'gpgcheck': 0}]

# Origin copr repo
#openshift_additional_repos=[{'id': 'openshift-origin-copr', 'name': 'OpenShift Origin COPR', 'baseurl': 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/epel-7-$basearch/', 'enabled': 1, 'gpgcheck': 1, gpgkey: 'https://copr-be.cloud.fedoraproject.org/results/maxamillion/origin-next/pubkey.gpg'}]

# enable htpasswd authentication
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/openshift/openshift-passwd'}]

# host group for masters
[masters]
ose3-master.example.com

# host group for nodes, includes region info
[nodes]
ose3-master.example.com openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
ose3-node1.example.com openshift_node_labels="{'region': 'primary', 'zone': 'east'}"
ose3-node2.example.com openshift_node_labels="{'region': 'primary', 'zone': 'west'}"
======================================================================= 
2. Run the ansible installer
ansible-playbook ~/openshift-ansible/playbooks/byo/config.yml

Actual results:

Zones and regions labels are not assigned to node

Expected results:

Zones and region labels shall be assigned to the host.

Additional info:

Comment 1 Miheer Salunke 2015-06-26 07:58:42 UTC
The manual overwriting of labels worked properly
[root@ose3-master ~]# oc label --overwrite node ose3-master.example.com region=infra zone=default
NAME                      LABELS                                                                     STATUS
ose3-master.example.com   kubernetes.io/hostname=ose3-master.example.com,region=infra,zone=default   Ready

Comment 3 Brenton Leanhardt 2015-07-04 07:59:16 UTC
*** Bug 1239034 has been marked as a duplicate of this bug. ***

Comment 4 Jason DeTiberus 2015-08-17 16:11:23 UTC
This has been addressed with the following PRs:
https://github.com/openshift/openshift-ansible/pull/416
https://github.com/openshift/openshift-ansible/pull/467
https://github.com/openshift/openshift-ansible/pull/475

All three have been merged into the master branch, and there should be a test installer update today with these changes.

Comment 6 Josep 'Pep' Turro Mauri 2015-10-06 09:41:15 UTC
Per comment #4 this is now addressed (and verified per comment #5) so closing.


Note You need to log in before you can comment on or make changes to this bug.