Try with full path spec.
This commit is contained in:
		
							parent
							
								
									9c41e87007
								
							
						
					
					
						commit
						c0122bfc53
					
				| 
						 | 
					@ -360,7 +360,7 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *appsv1.StatefulSet) *compa
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if !reflect.DeepEqual(c.Statefulset.Annotations, statefulSet.Annotations) {
 | 
						if !reflect.DeepEqual(c.Statefulset.Annotations, statefulSet.Annotations) {
 | 
				
			||||||
		match = false
 | 
							match = false
 | 
				
			||||||
		reasons = append(reasons, "new statefulset's annotations does not match the current one")
 | 
							reasons = append(reasons, "new statefulset's annotations do not match the current one")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	needsRollUpdate, reasons = c.compareContainers("initContainers", c.Statefulset.Spec.Template.Spec.InitContainers, statefulSet.Spec.Template.Spec.InitContainers, needsRollUpdate, reasons)
 | 
						needsRollUpdate, reasons = c.compareContainers("initContainers", c.Statefulset.Spec.Template.Spec.InitContainers, statefulSet.Spec.Template.Spec.InitContainers, needsRollUpdate, reasons)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -74,7 +74,7 @@ func (c *Cluster) majorVersionUpgrade() error {
 | 
				
			||||||
		if c.currentMajorVersion < desiredVersion {
 | 
							if c.currentMajorVersion < desiredVersion {
 | 
				
			||||||
			podName := &spec.NamespacedName{Namespace: masterPod.Namespace, Name: masterPod.Name}
 | 
								podName := &spec.NamespacedName{Namespace: masterPod.Namespace, Name: masterPod.Name}
 | 
				
			||||||
			c.logger.Infof("triggering major version upgrade on pod %s", masterPod.Name)
 | 
								c.logger.Infof("triggering major version upgrade on pod %s", masterPod.Name)
 | 
				
			||||||
			command := fmt.Sprintf("su postgres -c \"python3 /scripts/inplace_upgrade.py %d 2>&1 | tee last_upgrade.log\"", numberOfPods)
 | 
								command := fmt.Sprintf("su postgres -c \"/usr/bin/python3 /scripts/inplace_upgrade.py %d 2>&1 | tee last_upgrade.log\"", numberOfPods)
 | 
				
			||||||
			c.logger.Infof("executing: %s", command)
 | 
								c.logger.Infof("executing: %s", command)
 | 
				
			||||||
			_, err := c.ExecCommand(podName, command)
 | 
								_, err := c.ExecCommand(podName, command)
 | 
				
			||||||
			if err != nil {
 | 
								if err != nil {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue