Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple labels cause failure in launching the agent #11

Open
ctran opened this issue Sep 13, 2018 · 5 comments
Open

Multiple labels cause failure in launching the agent #11

ctran opened this issue Sep 13, 2018 · 5 comments

Comments

@ctran
Copy link

ctran commented Sep 13, 2018

It seems that the label flag is not working when it has space separated values like

-labels "dedicated fast faster"
@krumware
Copy link
Contributor

krumware commented Sep 27, 2018

This is working for me on latest, same command and labels, with the multiple labels being reflected on the jenkins side. Is the plugin up-to-date in jenkins?

Or perhaps it is updated, but your local container image is outdated?

@rafaelmagu
Copy link

Experiencing the same issue with the image, using Swarm plugin 3.15 on the master.

Feb 22, 2019 2:56:08 AM hudson.plugins.swarm.Client main
SEVERE: CmdLineException occurred during parseArgument
org.kohsuke.args4j.CmdLineException: No argument is allowed: staging
	at org.kohsuke.args4j.CmdLineParser.parseArgument(CmdLineParser.java:509)
	at hudson.plugins.swarm.Client.main(Client.java:46)

@rafaelmagu
Copy link

If I take the command that the entry point scripts tells me it is going to run and run it myself on the shell, it works. Something funky is happening when you set LABELS="foo bar" as an environment variable for the container.

@arbulu89
Copy link

Same issue here:
Apparently the next if statements are not working:

      if [ ! -z "$CANDIDATE_TAG"]; then
        PARAMS="$PARAMS -candidateTag $CANDIDATE_TAG"
      fi
      if [ "${DELETE_EXISTING_CLIENTS}x" = "truex"]; then
        PARAMS="$PARAMS -deleteExistingClients"
      fi
      if [ "${DISABLE_CLIENTS_UNIQUE_ID}x" = "truex"]; then
        PARAMS="$PARAMS -disableClientsUniqueId"
      fi
      if [ "${DISABLE_SSL_VERIFICATION}x" = "truex"]; then
        PARAMS="$PARAMS -disableSslVerification"
fi

Anyway, it is a trivial fix

@mbtronics
Copy link

Perhaps you forgot to quote the labels before using them?

LABELS="foo bar"

swarm-client.jar -labels "${LABELS}"

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

No branches or pull requests

5 participants