deajan opened a new issue, #10703:
URL: https://github.com/apache/cloudstack/issues/10703

   ### problem
   
   Trying to setup a AlmaLinux 9.5 KVM host with Cloudstack 4.20.
   
   So far, I followed the instructions in the wiki and created a cloudstack 
user with sudo permissions.
   When running `sudo -u cloudstack cloudstack-setup-agent`, it did spit some 
strange error message
   ```
   Please input the Hypervisor type kvm/lxc:[kvm]
   DEBUG:root:execute:route -n|awk '/^0.0.0.0/ {print $2,$8}'
   Failed to get default route. Please configure your network to have a default 
route
   
   ```
   
   When running `route -n|awk '/^0.0.0.0/ {print $2,$8}'` alone it worked well.
   So I started hacking into the python code, and added a raise statement.
   
   This time, I got the following error message
   ```
   PermissionError: [Errno 13] Permission denied: '/bin/sh'
   ```
   
   This allowed me to debug and find out that I had  `Defaults noexec` in my 
`/etc/sudoers` file set, even when running sudo I wasn't allowed to run 
`/bin/sh`.
   
   The problem here is that running `cloudstack-setup-agent` with sudo doesn't 
create any error log in   `/var/log/cloudstack/agent/setup.log` file, even if 
running `sudo -u cloudstack echo "Test" >> /var/log/cloudstack/agent/setup.log` 
works.
   
   As a side note, the bash class should perhaps send those exception errors to 
stderr too
   
   
   ### versions
   
   The versions of ACS, hypervisors, storage, network etc..
   
   ### The steps to reproduce the bug
   
   1.
   2.
   3.
   ...
   
   
   ### What to do about it?
   
   _No response_


-- 
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.apache.org

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

Reply via email to