tetra12 edited a comment on issue #5370:
URL: https://github.com/apache/cloudstack/issues/5370#issuecomment-908752939


   Hello @GabrielBrascher 
   According to your advice, I made the following adjustments:
   
   Host setup
   
   cloudbr0 - 185.185.X.Y
   cloudbr1 - 192.168.100.2
   
   In the Physical Network Setup:
   
   Public, Guest -> cloudbr0
   Management, Storage -> cloudbr1
   
   In the Global Settings:
   
   management.network.cidr = 192.168.100.0/24 
   
   Still no luck. The REAL problem is that I'm getting an exception inside the 
SSVM since it **connects to the wrong host**.
   
   Inside the SSVM `/var/log/cloud.log` I'm getting:
   ```
   2021-08-30 20:51:27,940 INFO  [utils.nio.NioClient] (main:null) Connecting 
to 185.185.X.Y:8250
   2021-08-30 20:51:31,002 ERROR [utils.nio.NioConnection] (main:null) Unable 
to initialize the threads.
   java.net.NoRouteToHostException: No route to host
           at java.base/sun.nio.ch.Net.connect0(Native Method)
   ```
   
   And indeed `curl -vv telnet://185.185.X.Y` times out, BUT `curl -vv 
telnet://192.168.100.2` work.
   
   I found that SSVM gets its IP from the `cmdline` file:
   ```
   root@s-1-VM:~# cat /var/cache/cloud/cmd_line.json
   {
   "type": "cmdline",
   "cmd_line": {
           "template": "domP",
           "type": "secstorage",
           "host": "185.185.X.Y",  <<<----- WRONG ADDRESS from cloudbr0, Need 
192.168.100.2 from cloudbr1
           "port": "8250",
           "name": "s-1-VM",
           "zone": "1",
           "pod": "1",
           "guid": "s-1-VM",
           "workers": "5",
           "resource": 
"org.apache.cloudstack.storage.resource.NfsSecondaryStorageResource",
           "instance": "SecStorage",
           "sslcopy": "false",
           "role": "templateProcessor",
           "mtu": "1500",
           "eth2ip": "185.X.Y.116",
           "eth2mask": "255.255.255.192",
           "gateway": "185.X.Y.65",
           "public.network.device": "eth2",
           "eth0ip": "169.254.123.48",
           "eth0mask": "255.255.0.0",
           "eth1ip": "192.168.100.22",
           "eth1mask": "255.255.255.0",
           "mgmtcidr": "192.168.100.2/24",
           "localgw": "192.168.100.1",
           "private.network.device": "eth1",
           "internaldns1": "193.106.93.93",
           "internaldns2": "8.8.4.4",
           "dns1": "8.8.8.8",
           "dns2": "8.8.4.4",
           "nfsVersion": "null"
           }
   }
   ```
   
   @DaanHoogland 
   SO indeed, `host = 185.185.X.Y`, which doesn't work for me. This address is 
taken from the `getControlp()` in `libvirt`, so that's the feature by design.
   
   However, I need to write host address as `192.168.100.2` instead of 
`185.185.x.y` to avoid the exception. How do I do that ? 
   How do I update/change what gets written to the `/var/cache/cloud/cmdline` 
inside 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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to