[PKG-Openstack-devel] Bug#774788: Bug#774788: neutron-metadata-agent overwrites config on update

Benedikt Trefzer benedikt.trefzer at cirrax.com
Sat Jan 10 10:22:35 UTC 2015


Hi Thomas

>> I currently not able to imagine where it reads the config file. (Sorry
>> ;(). Especially I cannot understand why it does eg not change the region
>> which seems to me like equivalent configured.
> 
> The values are read from within the pkgos_read_admin_creds function of
> openstack-pkg-tools. The function is called this way in the
> debian/neutron-metadata-agent.config.in:
> 
> pkgos_read_admin_creds ${META_AGNT_CONF} DEFAULT neutron-metadata
> 

Ok I found this one. the function pkgos_read_admin_creds() in postinst
script is never run. instead the one in config is used.
(Probably we should delete the
pkgos_read_admin_creds() definition in postinst, since it is never used
there.)

Anyway. I understood the function itself.

And I found the bug !

The function looks for the config parameter
auth_host, which is not defined in metadata_agent.ini (it is in
neutron.conf)
It then overwrites the auth_url parameter.

But actually it should look first at auth_url, extract auth_host from
there and then write auth_url again.

If I define auth_host in metadata_agent.ini file, you're script seems to
work (this is a workaround for the problem).
But according to openstack code auth_host is not a defined configuration
option in metadata_agent.ini file.

I can imagine the following solutions:
- rewrite pkgos_read_admin_creds() to use auth_url values (and this
  without braking other invocations of this function !)

- define pkgos_read_admin_creds_metadata_only() function as a
  replacement in metadata-agent.

- introduce debconf neutron-metadata/auth_url and remove
  neutron-metadata/auth_host and change the scripts accordingly.

I'm currently not capable of implementing any of these three solutions.
Any other ideas ?

Cheers

Benedikt Trefzer



More information about the Openstack-devel mailing list