Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-11264

osp.edpm.edpm_users role rerun as part of bootstrap playbook with extending nodeset fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • rhos-18.0.4
    • None
    • edpm-ansible
    • None
    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • ?
    • ?
    • ?
    • None
    • Important

      Seen locally with below scenario:-

      • Deploy bootstrap dataplane service on a Nodeset with 1 edpm node
      • Extend Nodeset to include 1 more edpm node
      • Deploy bootstrap service against the updated nodeset

      The second attempt fails as below, difference is for the new node rescue block get's executed while for old node user already exists:-

       

      TASK [osp.edpm.edpm_users : Validating arguments against arg spec 'main' - The main entry point for the edpm_users role. argument_spec={'edpm_users_users': {'type': 'list', 'default': [{'name': 'qemu', 'uid': '107', 'gid': '107', 'shell': '/sbin/nologin', 'comment': 'qemu user'}, {'name': 'hugetlbfs', 'gid': '42477', 'group_only': True}], 'description': 'The list of users and or groups to create on the compute node.\n'}, 'edpm_users_extra_dirs': {'type': 'list', 'default': [{'path': '/var/lib/vhost_sockets', 'owner': 'qemu', 'group': 'qemu', 'setype': 'virt_cache_t', 'seuser': 'system_u', 'mode': '0755'}], 'description': 'The list of directories to create on the compute node for communication with host processes.\nThis shoudl only be used for directories that are required to be shared between containers and host processes.\nWhere the host directories are created solely for the purpose of sharing content between containers or\nto persist data this should not be used.\n'}}, provided_arguments={}, validate_args_context={'type': 'role', 'name': 'edpm_users', 'argument_spec_name': 'main', 'path': '/usr/share/ansible/collections/ansible_collections/osp/edpm/roles/edpm_users'}] ***
      ^[[1;30mtask path: /usr/share/ansible/collections/ansible_collections/osp/edpm/playbooks/bootstrap.yml:11^[[0m
      Wednesday 06 November 2024  05:24:07 +0000 (0:00:00.068)       0:00:36.451 ****
      ^[[0;32mok: [edpm-compute-0] => {"changed": false, "msg": "The arg spec validation passed", "validate_args_context": {"argument_spec_name": "main", "name": "edpm_users", "path": "/usr/share/ansible/collections/ansible_collections/osp/edpm/roles/edpm_users", "type": "role"}}^[[0m
      ^[[0;32mok: [edpm-compute-1] => {"changed": false, "msg": "The arg spec validation passed", "validate_args_context": {"argument_spec_name": "main", "name": "edpm_users", "path": "/usr/share/ansible/collections/ansible_collections/osp/edpm/roles/edpm_users", "type": "role"}}^[[0mTASK [osp.edpm.edpm_users : Gather user fact gather_subset=['!all', '!min', 'user']] ***
      ^[[1;30mtask path: /usr/share/ansible/collections/ansible_collections/osp/edpm/roles/edpm_users/tasks/main.yml:16^[[0m
      Wednesday 06 November 2024  05:24:07 +0000 (0:00:00.056)       0:00:36.508 ****
      ^[[0;36mskipping: [edpm-compute-0] => {"changed": false, "false_condition": "ansible_user is undefined", "skip_reason": "Conditional result was False"}^[[0m
      ^[[0;36mskipping: [edpm-compute-1] => {"changed": false, "false_condition": "ansible_user is undefined", "skip_reason": "Conditional result was False"}^[[0mTASK [osp.edpm.edpm_users : Create host users and groups _raw_params=create_users_and_groups.yml] ***
      ^[[1;30mtask path: /usr/share/ansible/collections/ansible_collections/osp/edpm/roles/edpm_users/tasks/main.yml:25^[[0m
      Wednesday 06 November 2024  05:24:07 +0000 (0:00:00.057)       0:00:36.565 ****
      ^[[0;36mincluded: /usr/share/ansible/collections/ansible_collections/osp/edpm/roles/edpm_users/tasks/create_users_and_groups.yml for edpm-compute-0, edpm-compute-1 => (item={'name': 'qemu', 'uid': '107', 'gid': '107', 'shell': '/sbin/nologin', 'comment': 'qemu user'})^[[0mTASK [osp.edpm.edpm_users : Detect when user exists and cannot be created database=passwd, key={{ item.name }}] ***
      ^[[1;30mtask path: /usr/share/ansible/collections/ansible_collections/osp/edpm/roles/edpm_users/tasks/create_users_and_groups.yml:22^[[0m
      Wednesday 06 November 2024  05:24:07 +0000 (0:00:00.081)       0:00:36.647 ****
      ^[[0;31mfatal: [edpm-compute-1]: FAILED! => {"changed": false, "msg": "One or more supplied key could not be found in the database."}^[[0m
      ^[[0;32mok: [edpm-compute-0] => {"ansible_facts": {"getent_passwd": {"qemu": ["x", "107", "107", "qemu user", "/home/qemu", "/sbin/nologin"]}}, "changed": false}^[[0mNO MORE HOSTS LEFT *************************************************************TASK [osp.edpm.edpm_users : Ensure group is present on the host [ qemu ] name={{ item.name }}, gid={{ item.gid }}, state=present] ***
      ^[[1;30mtask path: /usr/share/ansible/collections/ansible_collections/osp/edpm/roles/edpm_users/tasks/create_users_and_groups.yml:27^[[0m
      Wednesday 06 November 2024  05:24:08 +0000 (0:00:00.742)       0:00:37.389 ****
      ^[[0;33mchanged: [edpm-compute-1] => {"changed": true, "gid": 107, "name": "qemu", "state": "present", "system": false}^[[0mNO MORE HOSTS LEFT *************************************************************NO MORE HOSTS LEFT *************************************************************PLAY RECAP *********************************************************************
      ^[[0;33medpm-compute-0^[[0m             : ^[[0;32mok=25  ^[[0m ^[[0;33mchanged=2   ^[[0m unreachable=0    failed=0    ^[[0;36mskipped=22  ^[[0m rescued=0    ignored=0
      ^[[0;33medpm-compute-1^[[0m             : ^[[0;32mok=25  ^[[0m ^[[0;33mchanged=3   ^[[0m unreachable=0    failed=0    ^[[0;36mskipped=22  ^[[0m ^[[0;32mrescued=1   ^[[0m ignored=0
      Wednesday 06 November 2024  05:24:09 +0000 (0:00:00.726)       0:00:38.116 ****
      =============================================================================== 

      runner image used: quay.io/openstack-k8s-operators/openstack-ansibleee-runner@sha256:f28b134a6d9acbcdff9e43a6430639d94ef39fe6bc306b4b174fbdddc3684765

      Workaround was to create different nodeset for the new node, then issue was not seen.

      Also with edpm_max_fail_percentage=100, edpm_any_errors_fatal=false issue not seen.

      Also being discussed in the slack thread https://redhat-internal.slack.com/archives/CQXJFGMK6/p1730874064373149?thread_ts=1730823533.376499&cid=CQXJFGMK6

       

      Already deployed env can be tried to reproduce by using non default users with edpm_users_users like:-

      edpm_users_users: "[{'name': 'qemu1', 'uid': '110', 'gid': '110', 'shell': '/sbin/nologin', 'comment': 'qemu1 user'}]"

       

              rhn-support-ramishra Rabi Mishra
              ykarel@redhat.com Yatin Karel
              rhos-dfg-df
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: