Bug 976583 - certain values for setup_rewritten in cartridge's managed_files.yml does not remove the files expected
Summary: certain values for setup_rewritten in cartridge's managed_files.yml does not ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-20 22:28 UTC by Hiro Asari
Modified: 2015-05-14 23:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-24 14:47:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Hiro Asari 2013-06-20 22:28:20 UTC
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:

Comment 1 Jhon Honce 2013-06-20 23:23:37 UTC
Fixed in https://github.com/openshift/li/pull/1665

Comment 2 openshift-github-bot 2013-06-21 00:59:15 UTC
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

Comment 3 Meng Bo 2013-06-21 11:21:04 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.