Public bug reported: Currently if you call glance-manage db_export_metadefs without any additional options, it will export all current metadefs into the glance conf dir (e.g. /etc/glance/metadefs/) without any warning. If the files already exist it will overwrite them. This is a potentially very dangerous operation that would delete all the existing files in that directory without warning and with no way of getting them back. A new user may just call it hoping to see the parameters and instead end up having all their files overwritten whether they want to or not.
I think that db_export_metadefs should always require a parameter of the output directory to save them to. Either that or export them to a safer location by default. Would like additional input from Glance team on this one. Example: $ glance-manage db_export_metadefs 2014-09-08 16:11:15.865 5029 DEBUG oslo.db.sqlalchemy.session [-] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION _init_events /usr/local/lib/python2.7/dist- packages/oslo/db/sqlalchemy/session.py:461 2014-09-08 16:11:15.900 5029 INFO glance.db.sqlalchemy.metadata [-] Namespace RandomNumberGenerator saved in /etc/glance/metadefs/RandomNumberGenerator.json 2014-09-08 16:11:15.910 5029 INFO glance.db.sqlalchemy.metadata [-] Namespace VirtualCPUTopology saved in /etc/glance/metadefs/VirtualCPUTopology.json etc... ** Affects: glance Importance: Undecided Status: New -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to Glance. https://bugs.launchpad.net/bugs/1367011 Title: glance-manage db_export_metadefs should always require a directory option Status in OpenStack Image Registry and Delivery Service (Glance): New Bug description: Currently if you call glance-manage db_export_metadefs without any additional options, it will export all current metadefs into the glance conf dir (e.g. /etc/glance/metadefs/) without any warning. If the files already exist it will overwrite them. This is a potentially very dangerous operation that would delete all the existing files in that directory without warning and with no way of getting them back. A new user may just call it hoping to see the parameters and instead end up having all their files overwritten whether they want to or not. I think that db_export_metadefs should always require a parameter of the output directory to save them to. Either that or export them to a safer location by default. Would like additional input from Glance team on this one. Example: $ glance-manage db_export_metadefs 2014-09-08 16:11:15.865 5029 DEBUG oslo.db.sqlalchemy.session [-] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION _init_events /usr/local/lib/python2.7/dist- packages/oslo/db/sqlalchemy/session.py:461 2014-09-08 16:11:15.900 5029 INFO glance.db.sqlalchemy.metadata [-] Namespace RandomNumberGenerator saved in /etc/glance/metadefs/RandomNumberGenerator.json 2014-09-08 16:11:15.910 5029 INFO glance.db.sqlalchemy.metadata [-] Namespace VirtualCPUTopology saved in /etc/glance/metadefs/VirtualCPUTopology.json etc... To manage notifications about this bug go to: https://bugs.launchpad.net/glance/+bug/1367011/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp