facter uuid is not set many times and per node customization does not work

Bug #1806011 reported by Rabi Mishra
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Undecided
Rabi Mishra

Bug Description

facter variable 'uuid' is not set in some VMs (ovb rdocloud) and in containers. I guess facter is broken or something. So puppet does not apply per node hiera.

[root@overcloud-compute-0 ~]# facter uuid
a8fe66ff-3c42-42fb-804b-7612ba92af41
[root@overcloud-compute-0 ~]# cat /etc/puppet/hieradata/a8fe66ff-3c42-42fb-804b-7612ba92af41.json
{"nova::debug": "True"}

[root@overcloud-compute-0 ~]# crudini --get /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf DEFAULT debug
False

Rabi Mishra (rabi)
Changed in launchpad:
assignee: nobody → Rabi Mishra (rabi)
Rabi Mishra (rabi)
affects: launchpad → tripleo
Revision history for this message
Rabi Mishra (rabi) wrote :

So the issue is docker-puppet-$service containers run as unprivileged, and don't have access to devices, which means can't get facter 'uuid' variable.

[root@reprosubnode-1 ~]# sudo docker inspect --format='{{.HostConfig.Privileged}}' docker-puppet-nova
false

I've proposed a patch[1] to use $(cat /sys/class/dmi/id/product_uuid) instead. I don't see any reason to change these containers to run and privileged, unless someone thinks there is an issue with the current approach.

[1] https://review.openstack.org/#/c/621072

Changed in tripleo:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-docs (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/621350

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/621072
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=4de17945a1d5e9ed3aa2c535b426edf84936ded7
Submitter: Zuul
Branch: master

commit 4de17945a1d5e9ed3aa2c535b426edf84936ded7
Author: Rabi Mishra <email address hidden>
Date: Fri Nov 30 11:12:11 2018 +0530

    Set facter variable 'uuid' explicitly in docker-puppet.py

    Unprivileged docker-puppet-$service containers don't have access
    to devices and can't get facter 'uuid' variable. Therefore per node
    hiera customizations don't work. We can work around this by using
    /sys/class/dmi/id/product_uuid instead.

    dmidecode>=3.1 returns system-id in lower case, so it's better to
    use lowe case for compatibility.

    This would also require changes to the docs as ironic node
    introspection data may show it in both cases.

    Change-Id: I899de7732c5b29ed70d4d487fdbc363117ac327f
    Closes-Bug: #1806011

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/623404

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-docs (master)

Reviewed: https://review.openstack.org/621350
Committed: https://git.openstack.org/cgit/openstack/tripleo-docs/commit/?id=dd3a8da8725eec8c4e0ddf870d9f4503594f2778
Submitter: Zuul
Branch: master

commit dd3a8da8725eec8c4e0ddf870d9f4503594f2778
Author: Rabi Mishra <email address hidden>
Date: Sat Dec 1 19:19:15 2018 +0530

    Use lower case machine unique uuid

    Introspection data may return machine uuid in both upper and lower
    case. We need to use lower case uuid to identify a node.

    Change-Id: I9dc608eaf142df79f892dc6fcf0402beb75ee40d
    Related-Bug: #1806011

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/623491

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/rocky)

Reviewed: https://review.openstack.org/623404
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=d89fe2a99251f0b7da0f182e811c5e85e5c3de85
Submitter: Zuul
Branch: stable/rocky

commit d89fe2a99251f0b7da0f182e811c5e85e5c3de85
Author: Rabi Mishra <email address hidden>
Date: Fri Nov 30 11:12:11 2018 +0530

    Set facter variable 'uuid' explicitly in docker-puppet.py

    Unprivileged docker-puppet-$service containers don't have access
    to devices and can't get facter 'uuid' variable. Therefore per node
    hiera customizations don't work. We can work around this by using
    /sys/class/dmi/id/product_uuid instead.

    dmidecode>=3.1 returns system-id in lower case, so it's better to
    use lowe case for compatibility.

    This would also require changes to the docs as ironic node
    introspection data may show it in both cases.

    Change-Id: I899de7732c5b29ed70d4d487fdbc363117ac327f
    Closes-Bug: #1806011
    (cherry picked from commit 4de17945a1d5e9ed3aa2c535b426edf84936ded7)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/queens)

Reviewed: https://review.openstack.org/623491
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=10e8ea29a34286ce0b4ae310964d438b2277accb
Submitter: Zuul
Branch: stable/queens

commit 10e8ea29a34286ce0b4ae310964d438b2277accb
Author: Rabi Mishra <email address hidden>
Date: Fri Nov 30 11:12:11 2018 +0530

    Set facter variable 'uuid' explicitly in docker-puppet.py

    Unprivileged docker-puppet-$service containers don't have access
    to devices and can't get facter 'uuid' variable. Therefore per node
    hiera customizations don't work. We can work around this by using
    /sys/class/dmi/id/product_uuid instead.

    dmidecode>=3.1 returns system-id in lower case, so it's better to
    use lowe case for compatibility.

    This would also require changes to the docs as ironic node
    introspection data may show it in both cases.

    Change-Id: I899de7732c5b29ed70d4d487fdbc363117ac327f
    Closes-Bug: #1806011
    (cherry picked from commit 4de17945a1d5e9ed3aa2c535b426edf84936ded7)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 8.2.0

This issue was fixed in the openstack/tripleo-heat-templates 8.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 9.2.0

This issue was fixed in the openstack/tripleo-heat-templates 9.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 10.3.0

This issue was fixed in the openstack/tripleo-heat-templates 10.3.0 release.

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.