Github user remibergsma commented on the pull request:
https://github.com/apache/cloudstack/pull/288#issuecomment-105224256
@bhaisaab Tested with non-privileged user (now uses sudo) and with root
user (does not use sudo) and both just add the host as one would expect.
As user 'cloudstack':
```
May 25 07:29:00 kvm2 sshd[6938]: Accepted password for cloudstack from
192.168.x.x port 39542 ssh2
May 25 07:29:00 kvm2 sshd[6938]: pam_unix(sshd:session): session opened for
user cloudstack by (uid=0)
May 25 07:29:03 kvm2 sudo: cloudstack : TTY=unknown ; PWD=/home/cloudstack
; USER=root ; COMMAND=/bin/cloudstack-setup-agent -m 192.168.x.x -z 2 -p 2 -c 3
-g 57acd541-cd37-34ea-af6a-dc6ecd007325 -a --pubNic=cloudbr0 --prvNic=cloudbr0
--guestNic=cloudbr0 --hypervisor=kvm
May 25 07:30:04 kvm2 sshd[6942]: Received disconnect from 192.168.22.61:
11: Closed due to user request.
May 25 07:30:04 kvm2 sshd[6938]: pam_unix(sshd:session): session closed for
user cloudstack
```
As user 'root':
```
May 25 07:33:16 kvm2 sshd[7376]: Accepted password for root from
192.168.22.61 port 39543 ssh2
May 25 07:33:16 kvm2 sshd[7376]: pam_unix(sshd:session): session opened for
user root by (uid=0)
May 25 07:34:21 kvm2 sshd[7376]: Received disconnect from 192.168.22.61:
11: Closed due to user request.
May 25 07:34:21 kvm2 sshd[7376]: pam_unix(sshd:session): session closed for
user root
```
Since you also confirmed it works as expected I'm now merging it. Thanks!
Please note: the PR is against 4.5, we also need to get this to master..
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---