Bug 1539101 - There is an error in creating a persistent volume with openshift ansible playbook
Summary: There is an error in creating a persistent volume with openshift ansible play...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.7.1
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ---
: 3.7.z
Assignee: Vadim Rutkovsky
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-26 16:18 UTC by Joel Miller
Modified: 2023-09-14 04:16 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-09 08:57:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Joel Miller 2018-01-26 16:18:10 UTC
Description of problem:

Try to deploy the Openshift cluster off line. 1 master 2 nodes


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

OS: rhel 7.4
kernel: 3.10.0-693.11.6.el7.x86_64
rpm viersion: openshift-ansible-3.7.23-1.git.0.bc406aa.el7.noarch

How reproducible:

/etc/ansible/hosts

[OSEv3:children]
masters
nodes
etcd
nfs

[OSEv3:vars]
ansible_ssh_user=root
#ansible_become=true
openshift_deployment_type=openshift-enterprise
openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true', 'challenge': 'true', 'kind': 'HTPasswdPasswordIdentityProvider', 'filename': '/etc/origin/master/htpasswd'}]
openshift_disable_check=docker_image_availability,docker_storage,memory_availability

oreg_url=registry.scedian.com/openshift3/ose-${component}:${version}
openshift_examples_modify_imagestreams=true

openshift_clock_enabled=true

openshift_hosted_router_replicas=1
openshift_hosted_router_selector='router=yes'
openshift_master_default_subdomain=apps.example.com

openshift_hosted_etcd_storage_kind=nfs
openshift_metrics_install_metrics=true
openshift_metrics_hawkular_hostname=hawkular-metrics.apps.scedian.com
openshift_metrics_cassandra_storage_type=emptydir
openshift_metrics_image_prefix=registry.example.com/openshift3/

#openshift_logging_install_logging=true
#openshift_logging_image_prefix=registry.example.com/openshift3/

# host group for masters
[masters]
master.example.com 
	
# host group for etcd
[etcd]
master.example.com

# host group for nodes, includes region info
[nodes]
master.example.com openshift_node_labels="{'region': 'infra', 'zone': 'default'}"
node1.example.com openshift_node_labels="{'region': 'infra','router': 'yes', 'zone': 'default'}" openshift_schedulable=true
node2.example.com openshift_node_labels="{'region': 'infra', 'zone': 'default'}" openshift_schedulable=true

[nfs]
nfs.example.com

execute command:
ansible-playbbok /usr/share/ansible/openshift-ansible/playbooks/byo/config.yml

result:


Steps to Reproduce:
1.
2.
3.

Actual results:
TASK [Set install initialization 'Complete'] ***************************************************************************************************************
ok: [master.example.com]
ok: [node2.example.com]
ok: [node1.example.com]
ok: [nfs.example.com]

PLAY [Hosted Install Checkpoint Start] *********************************************************************************************************************

TASK [Set Hosted install 'In Progress'] ********************************************************************************************************************
ok: [master.example.com]
ok: [node2.example.com]
ok: [node1.example.com]
ok: [nfs.example.com]

PLAY [Create Hosted Resources - persistent volumes] ********************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************
ok: [master.example.com]

TASK [openshift_persistent_volumes : Create temp directory for volume definitions] *************************************************************************
fatal: [master.example.com]: FAILED! => {"failed": true, "msg": "The conditional check 'persistent_volumes | length() > 0 or persistent_volume_claims | length() > 0' failed. The error was: '{{ hostvars[groups.oo_first_master.0] | oo_persistent_volumes(groups) }}: kind'\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_persistent_volumes/tasks/main.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Create temp directory for volume definitions\n  ^ here\n"}
	to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/openshift-hosted.retry

PLAY RECAP *********************************************************************************************************************
localhost                  : ok=12   changed=0    unreachable=0    failed=0   
master.example.com         : ok=444  changed=54   unreachable=0    failed=1   
node1.example.com          : ok=168  changed=13   unreachable=0    failed=0   
node2.example.com          : ok=168  changed=13   unreachable=0    failed=0   


INSTALLER STATUS *********************************************************************************************************************
Initialization             : Complete
Health Check               : Complete
etcd Install               : Complete
Master Install             : Complete
Master Additional Install  : Complete
Node Install               : Complete
Hosted Install             : In Progress
	This phase can be restarted by running: playbooks/byo/openshift-cluster/openshift-hosted.yml



Failure summary:


  1. Hosts:    master.scedian.com
     Play:     Create Hosted Resources - persistent volumes
     Task:     Create temp directory for volume definitions
     Message:  The conditional check 'persistent_volumes | length > 0 or persistent_volume_claims | length > 0' failed. The error was: {{ hostvars[groups.oo_first_master.0] | oo_persistent_volumes(groups) }}: |failed no storage host detected
               
               The error appears to have been in '/usr/share/ansible/openshift-ansible/roles/openshift_persistent_volumes/tasks/main.yml': line 2, column 3, but may
               be elsewhere in the file depending on the exact syntax problem.
               
               The offending line appears to be:
               
               ---
               - name: Create temp directory for volume definitions
                 ^ here



Expected results:


Additional info:

There is no error prompt after commented out "- include: create_persistent_volumes.yml" in the openshift_hosted.yml。

Comment 1 Vadim Rutkovsky 2018-02-01 14:34:38 UTC
Seems very similar to https://bugzilla.redhat.com/show_bug.cgi?id=1538912#c3 - the playbooks mistakenly can't find configured NFS server. 

There is a fix for this in 3.9 - https://github.com/openshift/openshift-ansible/pull/6306, which might need to be (partially) backported to 3.9

Comment 2 Scott Dodson 2018-02-01 22:27:37 UTC
This looks identical to that bug. Marking as a dupe, will discuss further on that bug.

*** This bug has been marked as a duplicate of bug 1538912 ***

Comment 3 Vadim Rutkovsky 2018-02-02 10:09:53 UTC
These are not really duplicates - bug 1538912 happens on external NFS server - and this bug occurs on a deployed NFS server.

The fix would be the same for both - backport a relevant part of https://github.com/openshift/openshift-ansible/pull/6306 to 3.7

Comment 4 Vadim Rutkovsky 2018-02-02 15:58:03 UTC
Created https://github.com/openshift/openshift-ansible/pull/6999

Comment 5 Vadim Rutkovsky 2018-02-09 15:10:48 UTC
Can't reproduce that anymore in openshift-ansible-3.7.29-1.git.0.e1bfc35.el7 or latest release-3.7. I suppose this was revolved by https://github.com/openshift/openshift-ansible/pull/7000.

Joel, would mind trying that again on latest 3.7 package?

Comment 9 Vadim Rutkovsky 2018-03-07 09:52:49 UTC
Fix for persistent volume detection is available in openshift-ansible-3.7.29-1.git.0.e1bfc35.el7

Comment 10 Junqi Zhao 2018-03-09 08:57:48 UTC
Issue is not reproduced

openshift version:
openshift-ansible-3.7.36-1.git.0.0f4a93c.el7.noarch.rpm
openshift-ansible-callback-plugins-3.7.36-1.git.0.0f4a93c.el7.noarch.rpm
openshift-ansible-docs-3.7.36-1.git.0.0f4a93c.el7.noarch.rpm
openshift-ansible-filter-plugins-3.7.36-1.git.0.0f4a93c.el7.noarch.rpm
openshift-ansible-lookup-plugins-3.7.36-1.git.0.0f4a93c.el7.noarch.rpm
openshift-ansible-playbooks-3.7.36-1.git.0.0f4a93c.el7.noarch.rpm
openshift-ansible-roles-3.7.36-1.git.0.0f4a93c.el7.noarch.rpm

parameters:
openshift_metrics_install_metrics=true
openshift_metrics_hawkular_hostname=${HOST_NAME}
openshift_metrics_cassandra_storage_type=emptydir
openshift_metrics_image_prefix=${IMAGE_PREFIX}


openshift_metrics_cassandra_storage_type=dynamic is also tested

Close it as NOTABUG, please use the latest 3.7 openshift-ansible, if it still happens, please feel free to re-open this issue.

Comment 11 Adam Yen 2018-03-21 13:08:59 UTC
When will this version of openshift-ansible-3.7.36-1.git.0.0f4a93c.el7.noarch.rpm be available via the RH distribution? I am stuck in 3.7 with this installer bug.

Comment 14 Red Hat Bugzilla 2023-09-14 04:16:02 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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