Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
Notify when failing back to default container image
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Amarnath <ashish.amarnath@gmail.com>
  • Loading branch information
ashish-amarnath committed Sep 26, 2019
1 parent e76b8b0 commit 78e31bb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docker/machine.go
Expand Up @@ -92,7 +92,7 @@ func (m *Machine) Create(role string, version *string) error {
if m.container == nil {
var err error

machineImage := machineImage(version)
machineImage := m.machineImage(version)
if m.image != "" {
machineImage = m.image
}
Expand Down Expand Up @@ -221,9 +221,11 @@ func (m *Machine) Delete() error {
}

// machineImage is the image of the container node with the machine
func machineImage(version *string) string {
func (m *Machine) machineImage(version *string) string {
if version == nil {
return fmt.Sprintf("%s:%s", defaultImageName, defaultImageTag)
defaultImage := fmt.Sprintf("%s:%s", defaultImageName, defaultImageTag)
m.log.Info("Image for machine container not specified, using default comtainer image", defaultImage)
return defaultImage
}

//TODO(fp) make this smarter
Expand Down

0 comments on commit 78e31bb

Please sign in to comment.