[JIRA] (JENKINS-60165) EC2-Fleet-Plugin assigns instance name (‘Jenkins’ doesn’t have label ‘nonprodslave2’; ‘user2’ lacks permission to run on ‘nonprodslave2 i-************343’) after the label. This fails the role assignment by agent labels

23 views
Skip to first unread message

arindom.sarkar@gmail.com (JIRA)

unread,
Nov 14, 2019, 2:58:02 AM11/14/19
to jenkinsc...@googlegroups.com
Arindom Sarkar created an issue
 
Jenkins / Bug JENKINS-60165
EC2-Fleet-Plugin assigns instance name (‘Jenkins’ doesn’t have label ‘nonprodslave2’; ‘user2’ lacks permission to run on ‘nonprodslave2 i-************343’) after the label. This fails the role assignment by agent labels
Issue Type: Bug Bug
Assignee: Chad Schmutzer
Components: ec2-fleet-plugin
Created: 2019-11-14 07:57
Environment: Prod
Priority: Minor Minor
Reporter: Arindom Sarkar

EC2-Fleet Plugin assigns the instance_id with the name and does not actually provide the label when evaluated from "Role-Strategy" plugin. 

I have a agent labeled as "nonprodslave2" and assigned certain users to be able to build on that agent by putting "nonprodslave*." as the label expression. However when I logged in as the user and tried to invoke the job I got this error

 

"Jenkins’ doesn’t have label ‘nonprodslave2’; ‘user2’ lacks permission to run on ‘nonprodslave2 i-07f************6e’"

 

But When I looked at Jenkins --> Manage Jenkins --> Manage Nodes I could see the labels are assigned as "nonprodslave2". Somehow some attribute is exposing the label as "nonprodslave2 i-07f************6e" causing this issue.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

artem.stasuk@gmail.com (JIRA)

unread,
Dec 4, 2019, 2:43:04 PM12/4/19
to jenkinsc...@googlegroups.com

artem.stasuk@gmail.com (JIRA)

unread,
Dec 4, 2019, 2:51:03 PM12/4/19
to jenkinsc...@googlegroups.com

artem.stasuk@gmail.com (JIRA)

unread,
Dec 4, 2019, 2:58:02 PM12/4/19
to jenkinsc...@googlegroups.com

Just checked code, plugin doesn't add label to Node name, in fact node name is always just EC2 instance ID, however Jenkins users/plugins are able to change Node name after creation is that possible that you have some additional plugin which does that?

artem.stasuk@gmail.com (JIRA)

unread,
Dec 4, 2019, 3:11:02 PM12/4/19
to jenkinsc...@googlegroups.com

arindom.sarkar@gmail.com (JIRA)

unread,
Dec 6, 2019, 1:28:03 PM12/6/19
to jenkinsc...@googlegroups.com

Artem Stasiuk Not sure if I understand how jobs will be scheduled on specific slaves if EC2-Fleet does not assign any label or node name. Say I have a Job which I want to run on a specific slave, we usually put the slave label in "Restrict this job to" field in the job or in the pipeline code. And I could see that is working today where jobs are provisioned on specific slave labels. Just that the node name is not assigned properly.

artem.stasuk@gmail.com (JIRA)

unread,
Jan 4, 2020, 2:02:04 AM1/4/20
to jenkinsc...@googlegroups.com

Just to confirm instance name or agent name is added automatically by Jenkins, so it's not plugin feature. I think I see possible problem nonprodslave*. is conditional label. Let me try to check that.

artem.stasuk@gmail.com (JIRA)

unread,
Jan 4, 2020, 2:03:02 AM1/4/20
to jenkinsc...@googlegroups.com
Artem Stasiuk edited a comment on Bug JENKINS-60165
Just to confirm instance name or agent name is added automatically by Jenkins, so it's not plugin feature. I think I see possible problem {{nonprodslave*.}} is conditional label. Let me try to check that.


You should be able to specify just {{nonprodslave}} without conditional {{*.}}

arindom.sarkar@gmail.com (JIRA)

unread,
Jan 4, 2020, 2:20:03 AM1/4/20
to jenkinsc...@googlegroups.com

 I get error messages like "

‘Jenkins’ doesn’t have label ‘nonprodslave2’; ‘user2’ lacks permission to run on ‘nonprodslave2 i-0468***********’

"

Reply all
Reply to author
Forward
0 new messages