Skip to content

Commit

Permalink
Merge pull request #100 from platform9/private/platform9-v5.6/bp/Rohi…
Browse files Browse the repository at this point in the history
…trajak/AIR-662

edit .gitignore, stat for userImages, AIR-662
  • Loading branch information
Rohitrajak1807 authored Mar 3, 2023
2 parents 9619134 + c9dd00a commit 5143d29
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ build/
*.vscode*
*.code-workspace
*junit.xml

# IDE stuff
.vscode
.idea
21 changes: 20 additions & 1 deletion nodeletctl/pkg/nodeletctl/nodeletctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,26 @@ func DeployCluster(clusterCfg *BootstrapConfig) error {
nodeletCfg.NodeletRole = "master"
nodeletCfg.MasterList = &masterList
nodeletCfg.EtcdClusterState = "new"

for _, path := range nodeletCfg.UserImages {
if _, err := os.Stat(path); err != nil {
if os.IsNotExist(err) {
retErr := fmt.Errorf("invalid UserImage path in nodelet config %s, %w", path, err)
zap.S().Error(retErr)
return retErr
}
return err
}
}
for _, path := range nodeletCfg.SystemImages {
if _, err := os.Stat(path); err != nil {
if os.IsNotExist(err) {
retErr := fmt.Errorf("invalid SystemImage path in nodelet config %s, %w", path, err)
zap.S().Error(retErr)
return retErr
}
return err
}
}
nodeletSrcFile, err := GenNodeletConfigLocal(nodeletCfg, masterNodeletConfigTmpl)
if err != nil {
zap.S().Infof("Failed to generate config: %s", err)
Expand Down

0 comments on commit 5143d29

Please sign in to comment.