0
0
Jenkinsdevops~20 mins

Master-agent architecture in Jenkins - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Master-Agent Architecture Expert
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Jenkins Master-Agent Communication

In Jenkins master-agent architecture, what is the primary role of the agent?

AExecute build jobs assigned by the master
BManage user authentication and authorization
CStore build artifacts centrally
DSchedule build jobs on the master node
Attempts:
2 left
💡 Hint

Think about which component actually runs the build tasks.

💻 Command Output
intermediate
2:00remaining
Agent Connection Status Command Output

What is the output of the following Jenkins CLI command when the agent is connected and online?

java -jar jenkins-cli.jar -s http://jenkins.example.com list-agents
AError: Command not found
B
agent1  Online  Building
agent2  Online  Idle
C
agent1  Online  Idle
agent2  Offline  Disconnected
D
agent1  Offline  Disconnected
agent2  Offline  Disconnected
Attempts:
2 left
💡 Hint

Look for the status that indicates the agent is connected and ready.

Configuration
advanced
2:30remaining
Configuring Agent Launch Method

Which configuration snippet correctly sets a Jenkins agent to launch via SSH with the hostname 'agent-host' and user 'jenkins-user'?

A
<slave>
  <name>agent1</name>
  <launcher class="hudson.plugins.sshslaves.SSHLauncher">
    <host>agent-host</host>
    <port>22</port>
    <credentialsId>jenkins-user</credentialsId>
  </launcher>
</slave>
B
<slave>
  <name>agent1</name>
  <launcher class="hudson.slaves.JNLPLauncher"/>
  <host>agent-host</host>
  <user>jenkins-user</user>
</slave>
C
<agent>
  <name>agent1</name>
  <launchMethod>SSH</launchMethod>
  <host>agent-host</host>
  <user>jenkins-user</user>
</agent>
D
<slave>
  <name>agent1</name>
  <launcher class="hudson.plugins.sshslaves.SSHLauncher">
    <hostname>agent-host</hostname>
    <port>22</port>
    <user>jenkins-user</user>
  </launcher>
</slave>
Attempts:
2 left
💡 Hint

Check the XML tags and attribute names for SSHLauncher configuration.

Troubleshoot
advanced
2:00remaining
Agent Connection Failure Diagnosis

A Jenkins agent fails to connect to the master and shows 'Disconnected' status. Which of the following is the most likely cause?

AThe Jenkins master URL is set to HTTP instead of HTTPS
BThe master node is running out of disk space
CThe agent has too many executors configured
DThe agent's JNLP secret key is incorrect or missing
Attempts:
2 left
💡 Hint

Consider what is required for secure agent authentication.

🔀 Workflow
expert
3:00remaining
Master-Agent Job Execution Flow

Arrange the following steps in the correct order for a Jenkins job executed on an agent:

A2,1,3,4
B1,2,3,4
C1,3,2,4
D3,1,2,4
Attempts:
2 left
💡 Hint

Think about the logical flow from scheduling to execution to reporting.