Switch user for migration.
This commit is contained in:
		
							parent
							
								
									5c2ae67d89
								
							
						
					
					
						commit
						0d9a4fb6f4
					
				| 
						 | 
				
			
			@ -73,7 +73,7 @@ func (c *Cluster) majorVersionUpgrade() error {
 | 
			
		|||
		if c.currentMajorVersion < desiredVersion {
 | 
			
		||||
			podName := &spec.NamespacedName{Namespace: masterPod.Namespace, Name: masterPod.Name}
 | 
			
		||||
			c.logger.Infof("triggering major version upgrade on pod %s", masterPod.Name)
 | 
			
		||||
			_, err := c.ExecCommand(podName, fmt.Sprintf("python3 /scripts/inplace_upgrade.py %d | tee last_upgrade.log", numberOfPods))
 | 
			
		||||
			_, err := c.ExecCommand(podName, fmt.Sprintf("su postgres -c \"python3 /scripts/inplace_upgrade.py %d 2>&1 | tee last_upgrade.log\"", numberOfPods))
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				return err
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue