Skip to content

Commit

Permalink
Refuse to create "dummy" service on "svcmgr create --template"
Browse files Browse the repository at this point in the history
This could happen when the path is missing in the data sent to
the handler.
  • Loading branch information
cvaroqui committed Jul 11, 2019
1 parent af40e7d commit 462ec26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/node.py
Expand Up @@ -3038,6 +3038,7 @@ def install_service(self, path, fpath=None, template=None,
req = { req = {
"action": "create", "action": "create",
"options": { "options": {
"path": path,
"namespace": namespace, "namespace": namespace,
"provision": provision, "provision": provision,
"template": template, "template": template,
Expand Down Expand Up @@ -3102,6 +3103,8 @@ def install_service(self, path, fpath=None, template=None,
# force the new path # force the new path
for path, __data in _data.items(): for path, __data in _data.items():
break break
if path.endswith("svc/dummy"):
raise ex.excError("no path in deployment data")
_data = { _data = {
path: __data, path: __data,
} }
Expand Down

0 comments on commit 462ec26

Please sign in to comment.