Skip to content

Commit

Permalink
Merge pull request #165 from Yancey1989/fix163
Browse files Browse the repository at this point in the history
Fix conflit secret error
  • Loading branch information
Yancey1989 authored Jun 23, 2017
2 parents 5024db6 + 3478214 commit 3bf910d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions paddlecloud/notebook/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,11 @@ def create_user_namespace(username):
"metadata": {
"name": user_namespace
}})
#create DataCenter sercret if not exists
secrets = v1api.list_namespaced_secret(user_namespace)
secret_names = [item.metadata.name for item in secrets.items]
for dc, cfg in settings.DATACENTERS.items():
#create DataCenter sercret if not exists
secrets = v1api.list_namespaced_secret(user_namespace)
secret_names = [item.metadata.name for item in secrets.items]

# create Kubernetes Secret for ceph admin key
if cfg["fstype"] == "cephfs" and cfg["secret"] not in secret_names:
with open(cfg["admin_key"], "r") as f:
Expand Down

0 comments on commit 3bf910d

Please sign in to comment.