StandalonePostDeployment is ignoring PythonInterpreter

Bug #1811875 reported by John Fulton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Invalid
High
Unassigned

Bug Description

When deploying standalone on rhel8 beta with 'PythonInterpreter: /usr/bin/python3' a task is run by StandalonePostDeployment which ignores the PythonInterpreter and the deployment fails [0][1]

The task that is run is:

ansible-playbook -i localhost, /var/lib/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922_playbook.yaml --extra-vars @/var/lib/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922_variables.json

which contains:

[stack@fultonj ~]$ sudo cat /var/lib/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922_playbook.yaml
---
- name: StandalonePostConfig
  connection: local
  hosts: localhost
  tasks:
    - name: Hiera symlink
      file:
        src: /etc/puppet/hiera.yaml
        dest: /etc/hiera.yaml
        state: link
        force: yes
[stack@fultonj ~]$

It results with the following input:

[stack@fultonj ~]$ sudo cat /var/lib/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922_variables.json
{"heat_config_id": "9691f8f3-e428-4a7c-aa58-03056e6eb922", "ansible_python_interpreter": "/usr/bin/python3", "deploy_server_id": "abe7dba5-916d-4fa4-b3ee-9417c5fb628c", "deploy_action": "CREATE", "deploy_stack_id": "standalone-AllNodesDeploySteps-y6p2mjpxw4dc-StandaloneExtraConfigPost-wycj4rnboqn6-StandalonePostDeployment-h3fghkms2jei-0-qgegy5zmpj3v/e2044d64-1a54-4118-aa22-3ed3d80d9b0f", "deploy_resource_name": "TripleOSoftwareDeployment", "deploy_signal_transport": "NO_SIGNAL", "heat_outputs_path": "/var/run/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922"}[stack@fultonj ~]$
[stack@fultonj ~]$

[stack@fultonj ~]$ rpm -qa | grep ansible
ansible-pacemaker-1.0.4-0.20181206042150.0e4d7c0.fc28.noarch
ansible-tripleo-ipsec-9.0.1-0.20190115094401.8b37e93.fc28.noarch
python3-heat-agent-ansible-1.7.1-0.20190108141114.828fd1e.fc28.noarch
ansible-python3-2.7.5-1.fc28.noarch
ansible-role-chrony-0.0.1-0.20190115103633.550aa62.fc28.noarch
ansible-role-tripleo-modify-image-1.0.1-0.20190114124825.d67f1ef.fc28.noarch
ansible-role-container-registry-1.0.1-0.20190114124641.61760f2.fc28.noarch
[stack@fultonj ~]$

FOOTNOTES:

[0] http://paste.openstack.org/show/742667/
[1]
TASK [Run deployment StandalonePostDeployment] ******************************************************************************************************************************
fatal: [fultonj]: FAILED! => {"changed": true, "cmd": "/usr/libexec/os-refresh-config/configure.d/55-heat-config\n exit $(jq .deploy_status_code /var/lib/heat-config/deployed/9691f8f3-e428-4a7c-aa58-03056e6eb922.notify.json)", "delta": "0:00:00.892246", "end": "2019-01-15 16:43:16.990442", "msg": "non-zero return code", "rc": 2, "start": "2019-01-15 16:43:16.098196", "stderr": "[2019-01-15 16:43:16,168] (heat-config) [DEBUG] Running /usr/libexec/heat-config/hooks/ansible < /var/lib/heat-config/deployed/9691f8f3-e428-4a7c-aa58-03056e6eb922.json\n[2019-01-15 16:43:16,215] (heat-config) [INFO] !!binary \"\"\n\n[2019-01-15 16:43:16,215] (heat-config) [DEBUG] b'[2019-01-15 16:43:16,208] (heat-config) [DEBUG] Running ansible-playbook -i localhost, /var/lib/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922_playbook.yaml --extra-vars @/var/lib/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922_variables.json\\n[2019-01-15 16:43:16,209] (heat-config) [WARNING] ansible not installed yet\\n'\n[2019-01-15 16:43:16,215] (heat-config) [INFO] Completed /usr/libexec/heat-config/hooks/ansible\n[2019-01-15 16:43:16,215] (heat-config) [DEBUG] Running heat-config-notify /var/lib/heat-config/deployed/9691f8f3-e428-4a7c-aa58-03056e6eb922.json < /var/lib/heat-config/deployed/9691f8f3-e428-4a7c-aa58-03056e6eb922.notify.json\n[2019-01-15 16:43:16,976] (heat-config) [INFO] b''\n[2019-01-15 16:43:16,976] (heat-config) [DEBUG] b''\n/bin/sh: line 1: exit: null: numeric argument required", "stderr_lines": ["[2019-01-15 16:43:16,168] (heat-config) [DEBUG] Running /usr/libexec/heat-config/hooks/ansible < /var/lib/heat-config/deployed/9691f8f3-e428-4a7c-aa58-03056e6eb922.json", "[2019-01-15 16:43:16,215] (heat-config) [INFO] !!binary \"\"", "", "[2019-01-15 16:43:16,215] (heat-config) [DEBUG] b'[2019-01-15 16:43:16,208] (heat-config) [DEBUG] Running ansible-playbook -i localhost, /var/lib/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922_playbook.yaml --extra-vars @/var/lib/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922_variables.json\\n[2019-01-15 16:43:16,209] (heat-config) [WARNING] ansible not installed yet\\n'", "[2019-01-15 16:43:16,215] (heat-config) [INFO] Completed /usr/libexec/heat-config/hooks/ansible", "[2019-01-15 16:43:16,215] (heat-config) [DEBUG] Running heat-config-notify /var/lib/heat-config/deployed/9691f8f3-e428-4a7c-aa58-03056e6eb922.json < /var/lib/heat-config/deployed/9691f8f3-e428-4a7c-aa58-03056e6eb922.notify.json", "[2019-01-15 16:43:16,976] (heat-config) [INFO] b''", "[2019-01-15 16:43:16,976] (heat-config) [DEBUG] b''", "/bin/sh: line 1: exit: null: numeric argument required"], "stdout": "", "stdout_lines": []}
...ignoring

TASK [Run async deployment StandalonePostDeployment] ************************************************************************************************************************
skipping: [fultonj]

TASK [Output for sync deployment StandalonePostDeployment] ******************************************************************************************************************
fatal: [fultonj]: FAILED! => {
    "msg": [
        {
            "stderr": [
                "[2019-01-15 16:43:16,168] (heat-config) [DEBUG] Running /usr/libexec/heat-config/hooks/ansible < /var/lib/heat-config/deployed/9691f8f3-e428-4a7c-aa58-03056e6eb922.json",
                "[2019-01-15 16:43:16,215] (heat-config) [INFO] !!binary \"\"",
                "",
                "[2019-01-15 16:43:16,215] (heat-config) [DEBUG] b'[2019-01-15 16:43:16,208] (heat-config) [DEBUG] Running ansible-playbook -i localhost, /var/lib/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922_playbook.yaml --extra-vars @/var/lib/heat-config/heat-config-ansible/9691f8f3-e428-4a7c-aa58-03056e6eb922_variables.json\\n[2019-01-15 16:43:16,209] (heat-config) [WARNING] ansible not installed yet\\n'",
                "[2019-01-15 16:43:16,215] (heat-config) [INFO] Completed /usr/libexec/heat-config/hooks/ansible",
                "[2019-01-15 16:43:16,215] (heat-config) [DEBUG] Running heat-config-notify /var/lib/heat-config/deployed/9691f8f3-e428-4a7c-aa58-03056e6eb922.json < /var/lib/heat-config/deployed/9691f8f3-e428-4a7c-aa58-03056e6eb922.notify.json",
                "[2019-01-15 16:43:16,976] (heat-config) [INFO] b''",
                "[2019-01-15 16:43:16,976] (heat-config) [DEBUG] b''",
                "/bin/sh: line 1: exit: null: numeric argument required"
            ]
        },
        {
            "status_code": "2"
        }
    ]
}

[stack@fultonj ~]$ cat standalone_parameters.yaml
resource_registry:
  OS::TripleO::Services::Docker: OS::Heat::None

parameter_defaults:
  CloudName: 192.168.24.2
  ControlPlaneStaticRoutes: []
  NtpServer: ["clock.redhat.com","clock2.redhat.com"]
  Debug: true
  DeploymentUser: stack
  DnsServers:
    - 10.19.43.29
    - 10.11.5.19
    - 10.5.30.160
  DockerInsecureRegistryAddress:
    - 192.168.24.2:8787
  NeutronPublicInterface: ens4
  # domain name used by the host
  NeutronDnsDomain: localdomain
  # re-use ctlplane bridge for public net, defined in the standalone
  # net config (do not change unless you know what you're doing)
  NeutronBridgeMappings: datacentre:br-ctlplane
  NeutronPhysicalBridge: br-ctlplane
  # enable to force metadata for public net
  #NeutronEnableForceMetadata: true
  StandaloneEnableRoutedNetworks: false
  StandaloneHomeDir: /home/stack
  StandaloneLocalMtu: 1500
  # Needed if running in a VM, not needed if on baremetal
  NovaComputeLibvirtType: qemu

  # below this comment is RHEL8 specific
  ContainerCli: podman
  SELinuxMode: permissive
  # bz#1630057
  SnmpdBindHost: ['udp:192.168.24.2:161','udp6:[::1]:161']
  PythonInterpreter: /usr/bin/python3
[stack@fultonj ~]$

Revision history for this message
Alex Schultz (alex-schultz) wrote :

This is an issue with the lack of ansible-playbook and not the python interpreter. The ansible heat hook depends on 'ansible-playbook' existing. You either have to install a dummy package that symlinks ansible-playbook to ansible-playbook-3 (as needed) or install a package with actual ansible-playbook.

Changed in tripleo:
status: Triaged → Invalid
Revision history for this message
John Fulton (jfulton-org) wrote :

So we'll continue to rely on the ansible-playbook command existing for things like?

https://github.com/openstack/tripleo-heat-templates/blob/master/docker/services/ceph-ansible/ceph-base.yaml#L468

What process of the undercloud install sets this up? Should we document it?

[stack@fultonj ~]$ ls -l `which ansible-playbook`
lrwxrwxrwx. 1 root root 27 Dec 18 16:54 /usr/bin/ansible-playbook -> /usr/bin/ansible-playbook-3
[stack@fultonj ~]$

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.