GutoVeronezi commented on PR #6900:
URL: https://github.com/apache/cloudstack/pull/6900#issuecomment-1412686269

   @DaanHoogland, here follows the tests:
   
   I recreated the SSVM:
   ```
   2023-02-01 15:46:27,304 DEBUG [o.a.c.s.SecondaryStorageManagerImpl] 
(Work-Job-Executor-3:ctx-f0e60658 job-1060/job-1065 ctx-066f71f0) 
(logid:b55ecf19) Found [nfs://192.168.30.140/mnt/secondary-storage] as 
secondary storage's URL for SSVM [s-216-VM].
   2023-02-01 15:46:27,304 INFO  [o.a.c.s.SecondaryStorageManagerImpl] 
(Work-Job-Executor-3:ctx-f0e60658 job-1060/job-1065 ctx-066f71f0) 
(logid:b55ecf19) Using [192.168.30.140] as address of secondary storage of SSVM 
[s-216-VM].
   ```
   
   Then, I verified the content of `/var/cache/cloud/cmdline`
   ```
   root@s-216-VM:~# cat /var/cache/cloud/cmdline
   template=domP type=secstorage host=192.168.202.150,192.168.202.151 port=8250 
name=s-216-VM zone=1 pod=1 guid=s-216-VM workers=5 
authorized_key=c3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCZ1FETC9OVmNPZnRVNU9WMHIyYmNxV2tUOXdySTdOV3pHTnM4Y3UzaTFWaWszbzJESUoyM284cWFHaUtLZHRlMDdTdDBVRnU5TUlBdFlxZ05kVzJnNXNzS2puaU84QVZKMFUrZ1o5bGdYUS9NaTRDT1lTNDhuQzNJaFhBUW14SlZCNDR4V2FtemhmNHBCNndIaDJqeFFCSUFLVTBVelNWWFd6SmtXYjA3M0ZFUUdraDJlV2F6YXN4ZVVsQmFRcDNNUnFla3Jmdks1WHFOVERUdGI1YUpNZTFqOUl3Yk84b0VtcmpyVnZDZnlvaXo3Wi9FTnlkaVl4TXlxdHlCei9pSW11dGQ0YXlET1JQYjNyaGVwUGZCMkJvdFFIRGtsMDN1UzdEMjVPZ21EaVZweVdzalhKY2lSeEorWm53SDdFR0tMejBMbnN4QUlkVitwZ3FzTVE4ZmhNcUYybkx2TFlwejZvYWlTUnRGTlEyUERqZU9aRVAzeGRUUDkwbXpzUmpteGhaZ2JBU3pRUE5lRWYwZ1RmeXFmTjIrUThZYkFyWmhLRDJUeDFPQ2hmTFRPbUNBUkNjbjFRUmkrV29BUmhoVkZmNmhCeU9xalZXdEZVblR4L0NCaDBMdjVyNU5aK0ZIelNLRDJVYjJ0NXVhWDVXaFo4Ym1LT3JPNDh2NDVjd1dTYzA9IGNsb3VkQGNsb3Vkc3RhY2stbGFiLW1hbmFnZW1lbnQtMQo=
 resource=com.cloud.storage.resource.PremiumSecondaryStorageResource
  instance=SecStorage sslcopy=false role=templateProcessor mtu=1500 
eth2ip=172.16.200.100 eth2mask=255.255.255.0 gateway=172.16.200.1 
public.network.device=eth2 eth0ip=169.254.238.235 eth0mask=255.255.0.0 
eth1ip=192.168.202.86 eth1mask=255.255.255.0 mgmtcidr=172.16.200.0/24 
localgw=192.168.202.1 private.network.device=eth1 eth3ip=192.168.30.86 
eth3mask=255.255.255.0 storageip=192.168.30.86 storagenetmask=255.255.255.0 
storagegateway=192.168.30.1 internaldns1=8.8.8.8 dns1=8.8.8.8 dns2=8.8.4.4 
nfsVersion=null keystore_password=czQ0aXNGUXZwa1J2N2FuNg== 
useHttpsToUpload=true secondaryStorageServerAddress=192.168.30.140
   ```
   
   To test the script, I stopped the service `cloud`, unmounted the storage, 
and executed the script:
   
   ```
   root@s-216-VM:~# systemctl stop cloud
   root@s-216-VM:~# umount /mnt/SecStorage/e265f9ca-e368-313d-8ccc-7a4c4a1adc41
   root@s-216-VM:~# /usr/local/cloud/systemvm/ssvm-check.sh
   ================================================
   First DNS server is  8.8.8.8
   PING 8.8.8.8 (8.8.8.8): 56 data bytes
   --- 8.8.8.8 ping statistics ---
   2 packets transmitted, 0 packets received, 100% packet loss
   WARNING: cannot ping DNS server
   route follows
   Kernel IP routing table
   Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
   0.0.0.0         172.16.200.1    0.0.0.0         UG    0      0        0 eth2
   8.8.8.8         192.168.202.1   255.255.255.255 UGH   0      0        0 eth1
   169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
   172.16.200.0    0.0.0.0         255.255.255.0   U     0      0        0 eth2
   192.168.30.0    0.0.0.0         255.255.255.0   U     0      0        0 eth3
   192.168.202.0   0.0.0.0         255.255.255.0   U     0      0        0 eth1
   ================================================
   Good: DNS resolves cloudstack.apache.org
   ================================================
   ERROR: Storage nfs is not currently mounted
   Verifying if we can at least ping the storage
   Storage address is 192.168.30.140, trying to ping it
   PING 192.168.30.140 (192.168.30.140): 56 data bytes
   64 bytes from 192.168.30.140: icmp_seq=0 ttl=64 time=1.720 ms
   64 bytes from 192.168.30.140: icmp_seq=1 ttl=64 time=2.342 ms
   --- 192.168.30.140 ping statistics ---
   2 packets transmitted, 2 packets received, 0% packet loss
   round-trip min/avg/max/stddev = 1.720/2.031/2.342/0.311 ms
   Good: Can ping nfs storage address
   ================================================
   Management server is 192.168.202.150,192.168.202.151. Checking connectivity.
   2023/02/01 20:19:12 socat[5764] E write(5, 0x55c330088000, 1): Connection 
refused
   Good: Can connect to management server 192.168.202.150 port 8250
   2023/02/01 20:19:15 socat[5768] E connecting to AF=2 192.168.202.151:8250: 
Connection timed out
   Good: Can connect to management server 192.168.202.151 port 8250
   ================================================
   ERROR: Java process not running.  Try restarting the SSVM.
   ```
   
   Then, I repeated the test removing `secondaryStorageServerAddress` from 
`/var/cache/cloud/cmdline`:
   
   ```
   root@s-216-VM:~# /usr/local/cloud/systemvm/ssvm-check.sh
   ================================================
   First DNS server is  8.8.8.8
   PING 8.8.8.8 (8.8.8.8): 56 data bytes
   --- 8.8.8.8 ping statistics ---
   2 packets transmitted, 0 packets received, 100% packet loss
   WARNING: cannot ping DNS server
   route follows
   Kernel IP routing table
   Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
   0.0.0.0         172.16.200.1    0.0.0.0         UG    0      0        0 eth2
   8.8.8.8         192.168.202.1   255.255.255.255 UGH   0      0        0 eth1
   169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth0
   172.16.200.0    0.0.0.0         255.255.255.0   U     0      0        0 eth2
   192.168.30.0    0.0.0.0         255.255.255.0   U     0      0        0 eth3
   192.168.202.0   0.0.0.0         255.255.255.0   U     0      0        0 eth1
   ================================================
   Good: DNS resolves cloudstack.apache.org
   ================================================
   ERROR: Storage nfs is not currently mounted
   Verifying if we can at least ping the storage
   Storage address is empty, trying to ping storage network gateway instead 
(192.168.30.1)
   PING 192.168.30.1 (192.168.30.1): 56 data bytes
   64 bytes from 192.168.30.1: icmp_seq=0 ttl=64 time=3.980 ms
   64 bytes from 192.168.30.1: icmp_seq=1 ttl=64 time=1.264 ms
   --- 192.168.30.1 ping statistics ---
   2 packets transmitted, 2 packets received, 0% packet loss
   round-trip min/avg/max/stddev = 1.264/2.622/3.980/1.358 ms
   Good: Can ping nfs storage network gateway
   ================================================
   Management server is 192.168.202.150,192.168.202.151. Checking connectivity.
   2023/02/01 20:22:54 socat[6030] E write(5, 0x55c336b75000, 1): Connection 
refused
   Good: Can connect to management server 192.168.202.150 port 8250
   2023/02/01 20:22:57 socat[6034] E connecting to AF=2 192.168.202.151:8250: 
Connection timed out
   Good: Can connect to management server 192.168.202.151 port 8250
   ================================================
   ERROR: Java process not running.  Try restarting the SSVM.
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to