From dc1a90097ff2a0099495d0266b3e6be82d55ae6c Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Mon, 15 Jun 2015 11:22:17 -0400 Subject: [PATCH 39/41] Upgrade: check file exists before chowning Dogtag entered a state where an upgrade script failed before it was trying to chown a file that didn't exist. Add a check that the file exists. --- base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership b/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership index 700aaf3ce682682148ed444337b25eaac2482b0b..686853c29aaedb0ba7e70bcb880df7037d54a324 100755 --- a/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership +++ b/base/server/upgrade/10.2.3/01-FixInstanceWorkFolderOwnership @@ -31,4 +31,5 @@ class FixInstanceWorkFolderOwnership(pki.server.upgrade.PKIServerUpgradeScriptle def upgrade_instance(self, instance): dir = os.path.join(instance.base_dir, 'work/Catalina/localhost/pki') - pki.util.chown(dir, instance.uid, instance.gid) + if os.path.exists(dir): + pki.util.chown(dir, instance.uid, instance.gid) -- 2.1.0