On 01/10/2015 11:22 AM, Benedikt Trefzer wrote: > 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.)
What is done is that *all* of the openstack-pkg-tools functions are added to both the config and postinst script. Probably the file could be split in 2 different libs, but that's not the way it is done currently. I don't think it's a big issue though. Yes, pkgos_read_admin_creds() is used only in the config script, as it should be... > 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. fa> > 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 ? I think it should be fine to re-implement pkgos_read_admin_creds and pkgos_write_admin_creds specifically for the metadata server .ini file. I'll work on this tomorrow. Cheers, Thomas Goirand (zigo) -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org