Description of problem: Assume we have: setup_rewritten: - versions/* in metadata/managed_files.yml in a cartridge. When migrating this cartridge, an existing directory /var/lib/openshift/<UUID>/<CARTRIDGE>/versions/* are not deleted Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. create an application from a cartridge with the above manifest requirement 2. bump up a cartridge version in the manifest, install it 3. migrate the application created in step 1. Actual results: /var/lib/openshift/<UUID>/<CARTRIDGE>/versions/* still exists (Be sure that the cartridge does not put new files in the same place during the migration.) Expected results: /var/lib/openshift/<UUID>/<CARTRIDGE>/versions/* is cleaned up appropriately. Additional info:
Fixed in https://github.com/openshift/li/pull/1665
Commit pushed to master at https://github.com/openshift/li https://github.com/openshift/li/commit/7a5f70293c6c9831cdfe8078e79467da498b447d Bug 976583 - migration did not handle directories from setup_versions
Checked on devenv_3398, 1. Modify the managed_file.yml as the comment#0 2. Upgrade the packages and modify the /usr/libexec/openshift/cartridges/v2/php/version/shared/configuration/etc/php.ini.erb and /usr/libexec/openshift/cartridges/v2/php/version/shared/configuration/etc/conf/httpd.conf to reflect the fix. 3. Run rhc-admin-migrate script with option --ignore-cartridge-version 4. After migrate, check the $OPENSHIFT_PHP_DIR/versions/shared/configuration/etc [root@ip-10-114-219-87 etc]# cat php.ini |grep MIGRATE AFTER_MIGRATE [root@ip-10-114-219-87 etc]# cat conf/httpd.conf |grep MIGRATE #AFTERMIGRATE The managed_file versions/* have been rewrited. Move bug to verified.