Bug 976583 - certain values for setup_rewritten in cartridge's managed_files.yml does not remove the files expected
certain values for setup_rewritten in cartridge's managed_files.yml does not ...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jhon Honce
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-20 18:28 EDT by Hiro Asari
Modified: 2015-05-14 19:12 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-24 10:47:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hiro Asari 2013-06-20 18:28:20 EDT
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 19:23:37 EDT
Fixed in https://github.com/openshift/li/pull/1665
Comment 2 openshift-github-bot 2013-06-20 20:59:15 EDT
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 07:21:04 EDT
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.