mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 13:22:36 +00:00 
			
		
		
		
	Add timezone verification to diskfull and diskless hierarchy tests
This commit is contained in:
		@@ -100,4 +100,14 @@ cmd:xdsh $$CN "cd /xcatpost; rmdir -p dir1/dir2/dir3"
 | 
			
		||||
check:rc==0
 | 
			
		||||
cmd:chdef -m -t node -o $$CN postscripts="dir1/dir2/dir3/foo.bar"
 | 
			
		||||
check:rc==0
 | 
			
		||||
 | 
			
		||||
# Check site table timezone
 | 
			
		||||
cmd:lsdef -t site -i timezone | awk -F= '{print $2}'
 | 
			
		||||
check:rc==0
 | 
			
		||||
# Check compute node timezone
 | 
			
		||||
cmd:xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'
 | 
			
		||||
check:rc==0
 | 
			
		||||
# Verify the compute node timezone matches the site table timezone
 | 
			
		||||
cmd:sitetz=`lsdef -t site -i timezone | awk -F= '{print $2}'`;nodetz=`xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'`; test $sitetz = $nodetz
 | 
			
		||||
check:rc==0
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
@@ -213,4 +213,14 @@ check:rc==0
 | 
			
		||||
cmd:rmimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
 | 
			
		||||
check:rc==0
 | 
			
		||||
 | 
			
		||||
# Check site table timezone
 | 
			
		||||
cmd:lsdef -t site -i timezone | awk -F= '{print $2}'
 | 
			
		||||
check:rc==0
 | 
			
		||||
# Check compute node timezone
 | 
			
		||||
cmd:xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'
 | 
			
		||||
check:rc==0
 | 
			
		||||
# Verify the compute node timezone matches the site table timezone
 | 
			
		||||
cmd:sitetz=`lsdef -t site -i timezone | awk -F= '{print $2}'`;nodetz=`xdsh $$CN "timedatectl | grep 'Time zone'" | awk -F: '{print $3}' | awk '{print $1}'`; test $sitetz = $nodetz
 | 
			
		||||
check:rc==0
 | 
			
		||||
 | 
			
		||||
end
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user