Identify constraint problems

Blame the constraints!

The problem

Until now it was not possible to easily identify if the constraints are the reaseon for your job to hang in state scheduled and not switching to building. That caused a lot of confusion for it was not clear what the problem is and if the state would change.

The solution

Now it is possible to identify such problems. How? If no suitable idle worker was found, the dispatcher periodically checks all workers in the states building, away and down. There can be two results:

1. There is no suitable worker at all
In that case a detailed string is generated which looks like this:

"scheduled: no compliant workers (constraints mismatch hint: hardware sandbox)"

The message indicates that there are no workers at all that can build the job. Therefore the job will never be built. The message also points you in the direction which parts of the constraints are causing this. In the case above something in hardware and sandbox is to blame.

In this case most likely your constraints are wrong and need to be changed.

2. There is a suitable worker that is busy / down at the moment
This job can be built. But not at the moment. The returned detail string is:

"waiting for 4 compliant workers"

This message means that 4 workers can build the job, but all are in a state that prevents building. If one of the workers switches to state idle the job will start building. If there are workers in state down this will also be displayed.

How to access this information?

To view these detailed scheduled information you can either use the osc client or the WebUI.

# osc r -v Application:Geo sfcgal -r openSUSE_Factory_ARM
openSUSE_Factory_ARM aarch64    scheduled: waiting for 4 compliant workers (1 of them down)
openSUSE_Factory_ARM armv7l     scheduled

# osc r -v home:mstrigl cowsay -r openSUSE_Leap_42.1
openSUSE_Leap_42.1   x86_64     scheduled: no compliant workers (constraints mismatch hint: hardware sandbox)

What do you think? Let us know on the mailing list, on IRC or in the comments!

Have fun :)