[openstack-dev] [packaging] how to deal with the rename of config files in neutron on upgrade?

Ihar Hrachyshka ihrachys at redhat.com
Mon Jul 13 06:22:22 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

UPD: in the end, we went the easy way, emulating .rpmnew process in
%post scriptlets (see the patch linked in my previous email, if you
want to see details).

AFAIK there is no distinguished directive or macro that would allow to
maintain .rpmnew process on renames.

Ihar

On 07/07/2015 03:09 PM, Ihar Hrachyshka wrote:
> On 07/02/2015 06:35 PM, Matt Riedemann wrote:
>> This change in neutron [1] renames the linuxbridge and
>> openvswitch plugin config files.  I'm familiar with the
>> %config(noreplace) directive in rpm but I'm not sure if there is
>> a special trick with rpm to rename a config file while not losing
>> the changes in the config file during the upgrade.
> 
>> Is this just something that has to be handled with trickery in
>> the %post macro where we merge the contents together if the old
>> config file exists?  Would symbolic links help?
> 
>> Changes like this seem like a potential giant pain in the ass for
>>  packagers.
> 
>> [1] https://review.openstack.org/#/c/195277/
> 
> 
> Tha change was long overdue. Hopefully, now that the file name is
> not that misleading, debian packages will avoid loading 
> plugin.ini/ml2_conf.ini for the agents. :)
> 
> My plan for RDO is to make agents read a config-dir instead of 
> config-files for those files, and populate a config-dir with
> symlinks pointing to those files that exist on the system. For
> upgrade scenario, the config-dir will contain links to both files,
> while for new installations, it will be a single symlink case.
> 
> And here is the RDO review for your reference: 
> https://review.gerrithub.io/238887
> 
> I don't believe those kind of upgrade hacks belong to deployment
> tools like puppet. Ideally, you would just switch the name of the 
> configuration file and be done with it.
> 
> Ihar
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJVo1kbAAoJEC5aWaUY1u57ipsIAOVDA2GKvcnMDIdPj4nZBlrp
Q321JuYGl0t0+s2WXOBrsTXdereL7j0+1AaxE3V5SHME2kJjGdZ3kTEOwlsMif0g
Un9R3+a6loX2/r8AjDnz1KzLY63HjHYitJYZUXNjAmQwRF03cXYAlXZa11vqM4WI
I0g9TS+AfuaxJPj4lrwma52nSGqUAdEKi7CDgt5sOlObqgh9cyjHSdbqJvN6/XMe
GOavorn7AY4kAh4Li9bQ99KhbW43TjvApwnUbOBd/QuGT/qDjnrgkpz7W3viok0H
7P0syKOf+5bAOV4TI1tgqeatPd8Udjvh1kuloYHkRfqAaRipARecrN17SFzpZrc=
=lCGk
-----END PGP SIGNATURE-----



More information about the OpenStack-dev mailing list