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

Doesn't work with parameterized jobs #9

Open
waquidvp opened this issue May 25, 2022 · 2 comments
Open

Doesn't work with parameterized jobs #9

waquidvp opened this issue May 25, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@waquidvp
Copy link
Contributor

Nomad pipeline fails at the "init" stage when used in a parameterized job. The following error is returned by Nomad: cannot update non-parameterized job to being parameterized.

This is an issue with Nomad in which it currently doesn't support updating dispatched jobs. Nomad pipeline relies on updating the job in order to control the count parameter of each task group.

See the following issue already raised in Nomad: hashicorp/nomad#10941.

@waquidvp waquidvp added the bug Something isn't working label May 25, 2022
@muuki88
Copy link

muuki88 commented Jan 29, 2023

Hi @waquidvp

We are evaluating nomad-pipeline and it seems the issue you opened has already been closed. Does this mean that updating parameterized jobs works? Or is this something that needs to be fixed in this very plugin?

Thanks for you work on this ❤️

@waquidvp
Copy link
Contributor Author

waquidvp commented Feb 1, 2023

Hey @muuki88,

Thanks for taking at look the project. Like you said, the upstream Nomad ticket was closed and unfortunately the conclusion was that the fix wouldn't go in. However, there are two possible workarounds:

1. Use a patched version of Nomad

This is my current method, I have been maintaining a patch file which I have been applying when new versions are released (currently 1.4.3). The patch is derived from the pull request that was closed. This option isn't sustainable but it's what I have been using in our org. It adds some overhead when new versions of Nomad comes out as it requires you to maintain your own Nomad binaries. If you are interested in this option, I have attached the patch I use and I can provide more complete instructions in this thread - if needed.

update-payload-on-dispatched-job.patch

2. Using the nomad-pipeline API to dispatch jobs

This functionality is still work in progress but will be ready to use soon. As part of this feature, there will be a server component to nomad-pipeline which exposes an API. The way it works is by copying the job definition from a parameterised job and creating a new standard job using the same definition. This does however have some limitations which I am still working on fixing, the main one being the lack of support for the dispatch payload. Here is the WIP branch: https://github.com/hyperbadger/nomad-pipeline/tree/f-dispatch-pipelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants