Skip to content

CLOUDSTACK-8633: Changing file permissions from 755 to 440#591

Closed
sanju1010 wants to merge 1 commit into
apache:masterfrom
sanju1010:acsfix
Closed

CLOUDSTACK-8633: Changing file permissions from 755 to 440#591
sanju1010 wants to merge 1 commit into
apache:masterfrom
sanju1010:acsfix

Conversation

@sanju1010

Copy link
Copy Markdown
Contributor

With 0755 permissions on /etc/sudoers.d/cloudstack-management we are getting following error in bringing up CS:
Failed to start bean 'cloudStackLifeCycle'; nested exception is com.cloud.utils.exception.CloudRuntimeException: Failed to inject generated public key into systemvm iso sudo: /etc/sudoers.d/cloudstack-management is mode 0755, should be 0440sudo: sorry, you must have a tty to run sudo”

So I have changed the permissions to 440.

@asfbot

asfbot commented Jul 15, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #52 SUCCESS
This pull request looks good

@wilderrodrigues

Copy link
Copy Markdown
Contributor

@bhaisaab @DaanHoogland @remibergsma could you have a look at this?

Wasn't ACS management-server supposed to be executed as SUDO? If I'm right, there is no need to change the file permission so drastically.

In that case, @sanju1010 , you need to be sudo to run it. AFAIK we all run our ACS environments, prod and tests, as sudo.

Cheers,
WIlder

@asfbot

asfbot commented Jul 15, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #749 SUCCESS
This pull request looks good

@remibergsma

Copy link
Copy Markdown
Contributor

@wilderrodrigues currently I am on holiday and not able to look into stuff. As far as I know sudo was implemented for KVM agent only.

See ya in about 10 days!

Sent from my iPhone

On 15 Jul 2015, at 09:05, Wilder Rodrigues notifications@github.com wrote:

@bhaisaab @DaanHoogland @remibergsma could you have a look at this?

Wasn't ACS management-server supposed to be executed as SUDO? If I'm right, there is no need to change the file permission so drastically.

In that case, @sanju1010 , you need to be sudo to run it. AFAIK we all run our ACS environments, prod and tests, as sudo.

Cheers,
WIlder


Reply to this email directly or view it on GitHub.

@pvr9712

pvr9712 commented Jul 15, 2015

Copy link
Copy Markdown

I have tested this change and it works.
@wilderrodrigues it didn't work with sudo.

@wilderrodrigues

Copy link
Copy Markdown
Contributor

@pvr9712 the question here is not if it works or not, because it's quite clear that once the permission changes it will suffice @sanju1010's need. The point is: is that the right thing to do? That's why I CCed @bhaisaab and @DaanHoogland .

I don't think that the approach is completely right. It sound like something "oh, wait! I don't have permission to do that. Let's then change the file permissions.".

To be honest, I haven't seen anyone running into such a problem. Could you perhaps describe better the environment you have, @sanju1010 ?

Cheers,
Wilder

@pvr9712

pvr9712 commented Jul 15, 2015

Copy link
Copy Markdown

@wilderrodrigues if you look at the earlier commit, the code was refactored and I feel it is a miss. If this worked for someone, will be interested to know.
best,
Raja

@pvr9712

pvr9712 commented Jul 15, 2015

Copy link
Copy Markdown

BTW, here is my email on the Dev list with the details for this issues - including the earlier commit - Using Master builds, MS logs shows following error -
"management-server.log:org.springframework.context.ApplicationContextException: Failed to start bean 'cloudStackLifeCycle'; nested exception is com.cloud.utils.exception.CloudRuntimeException: Failed to inject generated public key into systemvm iso sudo: /etc/sudoers.d/cloudstack-management is mode 0755, should be 0440sudo: sorry, you must have a tty to run sudo"

After modifying the permissions - MS works fine.

Apparently, this is related to a checkin ...
commit 870e189
870e189

I have created a defect, CLOUDSTACK-8633https://issues.apache.org/jira/browse/CLOUDSTACK-8633, to track this

@wilderrodrigues

Copy link
Copy Markdown
Contributor

Hi @pvr9712

Thanks for the commit IDs, a bit of context always help.

It would have saved us some time if the PR would have the commit ID which caused the bug.

LGTM 👍

Cheers,
Wilder

@asfbot

asfbot commented Jul 15, 2015

Copy link
Copy Markdown

Sanjeev N on dev@cloudstack.apache.org replies:
I was trying to bring up MS with xencluster.

@asfbot

asfbot commented Jul 15, 2015

Copy link
Copy Markdown

Raja Pullela on dev@cloudstack.apache.org replies:
awesome!
agree on the context... thanks!

@yadvr

yadvr commented Jul 15, 2015

Copy link
Copy Markdown
Member

LGTM, good catch

@asfgit asfgit closed this in 87e53ea Jul 15, 2015
@yadvr

yadvr commented Jul 15, 2015

Copy link
Copy Markdown
Member

Added same logic for fedora20/21 spec files as well. Merged on master now.

maneesha-p pushed a commit to maneesha-p/cloudstack that referenced this pull request Jul 31, 2015
Reviewed-By: Raja

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

This closes apache#591
yadvr pushed a commit that referenced this pull request Jan 20, 2021
Fixes:
#588
#589
#590
#591
#601
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants