1
0
mirror of https://github.com/rancher/os.git synced 2025-08-19 15:26:49 +00:00

Fix --upgrade-console flag for upgrade

This commit is contained in:
Josh Curl 2016-08-29 11:29:32 -07:00
parent bd904fcbda
commit 0631e90ee0
No known key found for this signature in database
GPG Key ID: 82B504B9BCCFA677

View File

@ -107,14 +107,14 @@ func (s *Service) shouldRebuild(ctx context.Context) (bool, error) {
if newRebuildLabel == "always" { if newRebuildLabel == "always" {
return true, nil return true, nil
} }
if outOfSync { if s.Name() == "console" && cfg.Rancher.ForceConsoleRebuild {
if s.Name() == "console" {
if cfg.Rancher.ForceConsoleRebuild {
if err := config.Set("rancher.force_console_rebuild", false); err != nil { if err := config.Set("rancher.force_console_rebuild", false); err != nil {
return false, err return false, err
} }
return true, nil return true, nil
} }
if outOfSync {
if s.Name() == "console" {
origConsoleLabel := containerInfo.Config.Labels[config.CONSOLE] origConsoleLabel := containerInfo.Config.Labels[config.CONSOLE]
newConsoleLabel := s.Config().Labels[config.CONSOLE] newConsoleLabel := s.Config().Labels[config.CONSOLE]
if newConsoleLabel != origConsoleLabel { if newConsoleLabel != origConsoleLabel {