Avoid re-creating master pod if it is empty during sync. (#58)
Fixes #59
This commit is contained in:
		
							parent
							
								
									00150711e4
								
							
						
					
					
						commit
						a8ed1e25b4
					
				|  | @ -140,8 +140,7 @@ func (c *Cluster) recreatePods() error { | |||
| 	} | ||||
| 	if masterPod.Name == "" { | ||||
| 		c.logger.Warningln("No master pod in the cluster") | ||||
| 	} | ||||
| 
 | ||||
| 	} else { | ||||
| 		//TODO: do manual failover
 | ||||
| 		//TODO: specify master, leave new master empty
 | ||||
| 		c.logger.Infof("Recreating master pod '%s'", util.NameFromMeta(masterPod.ObjectMeta)) | ||||
|  | @ -149,6 +148,7 @@ func (c *Cluster) recreatePods() error { | |||
| 		if err := c.recreatePod(masterPod); err != nil { | ||||
| 			return fmt.Errorf("could not recreate master pod '%s': %v", util.NameFromMeta(masterPod.ObjectMeta), err) | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	return nil | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue