Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1649304

Summary: packstack incorrectly configures neutron-metadata-agent
Product: Red Hat OpenStack Reporter: Aleksandr Brezhnev <brezhnev>
Component: openstack-packstackAssignee: Yatin Karel <ykarel>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: medium Docs Contact:
Priority: low    
Version: 13.0 (Queens)CC: amoralej, elad.eyal, mburns, ykarel
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-packstack-12.0.0-6.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-10 12:17:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Aleksandr Brezhnev 2018-11-13 11:08:05 UTC
Description of problem:
The neutron-metadata-agent in OSP13 uses the nova_metadata_host parameter in the /etc/neutron/metadata-agent.ini file to communicate with the Nova metadata server. Packstack does not set this parameter. Instead, packstack sets nova_metadata_ip.  This parameter is ignored by the metadata-agent in OSP13. Instead, the metadata-agent uses the service default value (127.0.0.1) and communication with the Nova metadata server fails. As a result, instances can't get access to metadata.

The openstack-packstack-puppet package is able to configure nova_metadata_host but the /usr/share/openstack-puppet/modules/packstack/manifests/neutron/metadata.pp file does not pass this parameter:

class packstack::neutron::metadata ()
{
    class { '::neutron::agents::metadata':
      shared_secret    => hiera('CONFIG_NEUTRON_METADATA_PW'),
      metadata_ip      => force_ip(hiera('CONFIG_KEYSTONE_HOST_URL')),
      debug            => hiera('CONFIG_DEBUG_MODE'),
      metadata_workers => hiera('CONFIG_SERVICE_WORKERS'),
    }
}

There should be additional line:
      metadata_host    => force_ip(hiera('CONFIG_KEYSTONE_HOST_URL')),

Version-Release number of selected component (if applicable):
openstack-packstack-puppet-12.0.0-3.el7ost.noarch

How reproducible:
Use packstack to install cloud with controller and network nodes on separate systems

Actual results:
No nova_metadata_host line in the /etc/neutron/metadata-agent.ini on network nodes

Expected results:
There should be nova_metadata_host line with the IP address of the controller.

Additional info:

Comment 1 Alfredo Moralejo 2018-11-28 17:02:05 UTC
Queens backport is merged https://review.openstack.org/#/c/619665/

Comment 3 Alfredo Moralejo 2019-06-11 16:28:02 UTC
Patch included in openstack-packstack-12.0.0-6.el7ost

Comment 7 errata-xmlrpc 2019-07-10 12:17:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:1729

Comment 8 ee 2020-06-29 16:11:59 UTC
This seems to be still not solved in Ussuri - @amoralej wrote

this is debug - https://logserver.rdoproject.org/ci.centos.org/weirdo-generic-packstack-scenario001/10118/weirdo-project/logs/neutron/neutron-ovn-metadata-agent.log.txt.gz
and config file - https://logserver.rdoproject.org/ci.centos.org/weirdo-generic-packstack-scenario001/10118/weirdo-project/logs/etc/neutron/neutron_ovn_metadata_agent.ini.txt.gz
it should be nova_metadata_host instead of nova_metadata_ip
in the ci job i see nova_metadata_ip=192.168.1.12 in the config but in the log
nova_metadata_host             = 127.0.0.1
that case works because it's allinone
but it seems nova_metadata_ip is not working

Comment 9 Alfredo Moralejo 2020-06-30 07:49:29 UTC
(In reply to ee from comment #8)
> This seems to be still not solved in Ussuri - @amoralej wrote
> 
> this is debug -
> https://logserver.rdoproject.org/ci.centos.org/weirdo-generic-packstack-
> scenario001/10118/weirdo-project/logs/neutron/neutron-ovn-metadata-agent.log.
> txt.gz
> and config file -
> https://logserver.rdoproject.org/ci.centos.org/weirdo-generic-packstack-
> scenario001/10118/weirdo-project/logs/etc/neutron/neutron_ovn_metadata_agent.
> ini.txt.gz
> it should be nova_metadata_host instead of nova_metadata_ip
> in the ci job i see nova_metadata_ip=192.168.1.12 in the config but in the
> log
> nova_metadata_host             = 127.0.0.1
> that case works because it's allinone
> but it seems nova_metadata_ip is not working

This bz referred to neutron-metadata-agent while current issue is for neutron-ovn-metadata-agent so it's a different issue. I'll investigate it.