almostobvious commented on issue #11024:
URL: https://github.com/apache/cloudstack/issues/11024#issuecomment-2972022385

   Ok so it only took me ~10 hours to add a host, but I got there.
   
   1. I had to use cmk to clean up previous attempts at primary storage etc for 
now non-existent host. This was a bit confusing as I thought it was the cause 
of issues (but it wasn't). Still, this can't be properly done from the web ui 
because it lacks a whole raft of options - e.g. you can't put storagepool to 
maintenance.
   
   In my case I had to do:
   ```
   enable storagemaintenance id=<old / orphaned storage id>
   delete storagepool id=22594f15-9678-347e-9627-0f935db15e9f
   ```
   
   Which finally allowed me to get rid of orphaned storage.
   
   2. I uninstalled cloudstack-agent. Then cleaned up all config by finding and 
deleting a whole bunch of stuff that gets left behind after uninstall (and I 
was suspecting of causing havoc, but it really didn't). I used following (and 
some good judgement) to find what to delete
   
   ```
    find /usr/ -name "*libvirt*"
    find /etc/ -name "*libvirt*"
    find /var/ -name "*libvirt*"
    find /usr/ -name "*cloudstack*"
    find /etc/ -name "*cloudstack*"
    find /var/ -name "*cloudstack*"
   ```
   
   3. reboot, and then force installation of previous agent version that worked 
for me on RHEL/Rocky 9.5:
   
   `yum install cloudstack-agent-4.20.0.0-1`
   
   4. Now I went back and followed Quick install guide KVM config section here 
https://docs.cloudstack.apache.org/en/latest/quickinstallationguide/qig.html#kvm-configuration
   
   5. Now make sure nfs-server is running and set up correctly:
   
   ```
   // verify /etc/exports as follows:
   /exports/secondary *(rw,async,no_root_squash,no_subtree_check)
   /exports/primary *(rw,async,no_root_squash,no_subtree_check)
   
   // ensure correct ownership
    chown nobody:nobody /exports/primary/
    chown nobody:nobody /exports/secondary/
   
   // nfs server check
   systemctl enable --now nfs-server
   exportfs -r
   ```
   
   
   6. Start / enable agent
   ```
   systemctl enable cloudstack-agent
   systemctl start cloudstack-agent
   
   ```
   
   7. Now I used CMK to create host:
   
   `add host zoneid=<id> clusterid=<id> hypervisor=KVM username=root 
password=<pass> podid=<podid> url=http://<new host ip>`
   
   That took a little time, but succeeded.
   
   
   I am now pretty sure the issue is with the new agent build 4.20.1.0-1 
(whether or not it's down to the spurious ubuntu / paleo stuff it seems to be 
doing on RHEL I can't tell).
   
   
   


-- 
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