Skip to content

Commit 5a54a59

Browse files
author
Matthew Fisher
committed
fix(controller): create directory only on create
If a modification is made to the app, then the underlying signal should not tell etcd to re-create the directory or else etcd will complain that you are trying to write to an already-existing directory.
1 parent 31bfe60 commit 5a54a59

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

controller/api/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,8 @@ def _etcd_purge_user(**kwargs):
628628

629629
def _etcd_create_app(**kwargs):
630630
appname = kwargs['instance']
631-
_etcd_client.write('/deis/services/{}'.format(appname), None, dir=True)
631+
if kwargs['created']:
632+
_etcd_client.write('/deis/services/{}'.format(appname), None, dir=True)
632633

633634

634635
def _etcd_purge_app(**kwargs):

0 commit comments

Comments
 (0)