Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
08f40eac
Commit
08f40eac
authored
Nov 29, 2017
by
andyzhangx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
return error when create azure share failed
remember error info in CreateFileShare fix typo
parent
2c9ffc0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
azure_storage.go
pkg/cloudprovider/providers/azure/azure_storage.go
+7
-3
No files found.
pkg/cloudprovider/providers/azure/azure_storage.go
View file @
08f40eac
...
@@ -42,20 +42,24 @@ func (az *Cloud) CreateFileShare(name, storageAccount, storageType, location str
...
@@ -42,20 +42,24 @@ func (az *Cloud) CreateFileShare(name, storageAccount, storageType, location str
// find the access key with this account
// find the access key with this account
key
,
err
:=
az
.
getStorageAccesskey
(
account
.
Name
)
key
,
err
:=
az
.
getStorageAccesskey
(
account
.
Name
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
V
(
2
)
.
Infof
(
"no key found for storage account %s"
,
account
.
Name
)
err
=
fmt
.
Errorf
(
"could not get storage key for storage account %s: %v"
,
account
.
Name
,
err
)
continue
continue
}
}
err
=
az
.
createFileShare
(
account
.
Name
,
key
,
name
,
requestGB
)
err
=
az
.
createFileShare
(
account
.
Name
,
key
,
name
,
requestGB
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
V
(
2
)
.
Info
f
(
"failed to create share %s in account %s: %v"
,
name
,
account
.
Name
,
err
)
err
=
fmt
.
Error
f
(
"failed to create share %s in account %s: %v"
,
name
,
account
.
Name
,
err
)
continue
continue
}
}
glog
.
V
(
4
)
.
Infof
(
"created share %s in account %s"
,
name
,
account
.
Name
)
glog
.
V
(
4
)
.
Infof
(
"created share %s in account %s"
,
name
,
account
.
Name
)
return
account
.
Name
,
key
,
err
return
account
.
Name
,
key
,
err
}
}
}
}
return
""
,
""
,
fmt
.
Errorf
(
"failed to find a matching storage account"
)
if
err
==
nil
{
err
=
fmt
.
Errorf
(
"failed to find a matching storage account"
)
}
return
""
,
""
,
err
}
}
// DeleteFileShare deletes a file share using storage account name and key
// DeleteFileShare deletes a file share using storage account name and key
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment