Re: [openstack-dev] [cinder] [oslo] cinder.conf generation is broken for my_ip, building non-reproducibly
Thomas, Thanks for finding this. I have opened a bug and submitted a patch. Patch: https://review.openstack.org/552134 Bug: https://bugs.launchpad.net/cinder/+bug/1755282 Jay (jungleboyj) On 3/12/2018 3:17 AM, Thomas Goirand wrote: Hi, When inspecting Cinder's (Queens release) cinder.conf, I can see: # Warning: Failed to format sample for my_ip # unhashable type: 'HostAddress' So it seems there's an issue in either Cinder or Oslo. How can I investigate and fix this? It's very likely that I'm once more the only person in the OpenStack community that is really checking config file generation (it used to be like that for past releases), and therefore the only one who noticed it. Also, looking at the code, this seems to be yet-another-instance of "package cannot be built reproducible" [1] with the build host config leaking in the configuration (well, once that's fixed...). Indeed, in the code I can read: cfg.HostAddressOpt('my_ip', default=netutils.get_my_ipv4(), help='IP address of this host'), This means that, when that's repaired, build Cinder will write something like this: #my_ip = 1.2.3.4 With 1.2.3.4 being the value of netutils.get_my_ipv4(). This is easily fixed by adding something like this: sample-default='' I'm writing this here for Cinder, but there's been numerous cases like this already. The most common mistake being the hostname of the build host leaking in the configuration. While this is easily fixed at the packaging level fixing the config file after generating it with oslo.config, often that config file is also built with the sphinx doc, and then that file isn't built reproducibly. That's harder to detect, and easier fixed upstream. Cheers, Thomas Goirand (zigo) [1] https://reproducible-builds.org/ __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] [cinder] [oslo] cinder.conf generation is broken for my_ip, building non-reproducibly
Excerpts from Thomas Goirand's message of 2018-03-12 09:17:19 +0100: > Hi, > > When inspecting Cinder's (Queens release) cinder.conf, I can see: > > # Warning: Failed to format sample for my_ip > # unhashable type: 'HostAddress' This part sounds like it might be a bug in oslo.config, which does define a HostAddress class, but that class appears to have the needed method. Please file a bug. > > So it seems there's an issue in either Cinder or Oslo. How can I > investigate and fix this? > > It's very likely that I'm once more the only person in the OpenStack > community that is really checking config file generation (it used to be > like that for past releases), and therefore the only one who noticed it. > > Also, looking at the code, this seems to be yet-another-instance of > "package cannot be built reproducible" [1] with the build host config > leaking in the configuration (well, once that's fixed...). Indeed, in > the code I can read: > > cfg.HostAddressOpt('my_ip', >default=netutils.get_my_ipv4(), >help='IP address of this host'), > > This means that, when that's repaired, build Cinder will write something > like this: > > #my_ip = 1.2.3.4 > > With 1.2.3.4 being the value of netutils.get_my_ipv4(). This is easily > fixed by adding something like this: > > sample-default='' > > I'm writing this here for Cinder, but there's been numerous cases like > this already. The most common mistake being the hostname of the build > host leaking in the configuration. While this is easily fixed at the > packaging level fixing the config file after generating it with > oslo.config, often that config file is also built with the sphinx doc, > and then that file isn't built reproducibly. That's harder to detect, > and easier fixed upstream. These sorts of issues are bugs in the consumers of oslo.config, and should be filed there, since the library can't choose reasonable default values. Doug > > Cheers, > > Thomas Goirand (zigo) > > [1] https://reproducible-builds.org/ > __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[openstack-dev] [cinder] [oslo] cinder.conf generation is broken for my_ip, building non-reproducibly
Hi, When inspecting Cinder's (Queens release) cinder.conf, I can see: # Warning: Failed to format sample for my_ip # unhashable type: 'HostAddress' So it seems there's an issue in either Cinder or Oslo. How can I investigate and fix this? It's very likely that I'm once more the only person in the OpenStack community that is really checking config file generation (it used to be like that for past releases), and therefore the only one who noticed it. Also, looking at the code, this seems to be yet-another-instance of "package cannot be built reproducible" [1] with the build host config leaking in the configuration (well, once that's fixed...). Indeed, in the code I can read: cfg.HostAddressOpt('my_ip', default=netutils.get_my_ipv4(), help='IP address of this host'), This means that, when that's repaired, build Cinder will write something like this: #my_ip = 1.2.3.4 With 1.2.3.4 being the value of netutils.get_my_ipv4(). This is easily fixed by adding something like this: sample-default='' I'm writing this here for Cinder, but there's been numerous cases like this already. The most common mistake being the hostname of the build host leaking in the configuration. While this is easily fixed at the packaging level fixing the config file after generating it with oslo.config, often that config file is also built with the sphinx doc, and then that file isn't built reproducibly. That's harder to detect, and easier fixed upstream. Cheers, Thomas Goirand (zigo) [1] https://reproducible-builds.org/ __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev