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

Fixes for flux-start #2

Merged
merged 2 commits into from
Sep 27, 2014
Merged

Conversation

grondo
Copy link
Contributor

@grondo grondo commented Sep 27, 2014

Minor fixes for flux-start functionality:

  • fix srun --job-name option
  • fix parsing of non-option args in getopt()

srun(1) option to set job name is --job-name not --jobname.
We don't want to parse flux-start `command` args as our own, so
be sure to set the POSIXLY_CORRECT flag for getopt_long() so
that it stops processing at the first non-option arg. That way
commands with arguments are processed unharmed. (This is done
by prepending '+' to shortopts in getopt_long(3).

For example, before this commit, flux-start eradicates all options
to wreckrun in this test:

 flux start -N4 flux wreckrun -N4 hostname

after the commit, wreckrun args should be preserved.
garlick added a commit that referenced this pull request Sep 27, 2014
@garlick garlick merged commit 2688b82 into flux-framework:master Sep 27, 2014
@garlick
Copy link
Member

garlick commented Sep 27, 2014

Nice. Er, whoops on the --job-name option.

@grondo grondo deleted the flux-start-fixes branch September 30, 2014 04:13
trws referenced this pull request in trws/flux-core Jul 19, 2015
a few more build fixes for travis, lua5.2, and python unit tests
garlick added a commit that referenced this pull request Mar 17, 2017
chu11 added a commit to chu11/flux-core that referenced this pull request Dec 15, 2017
@chu11 chu11 mentioned this pull request Apr 30, 2018
grondo pushed a commit that referenced this pull request May 3, 2018
Add tests to cover RPCs with multiple responses.

An RPC issues a requested number of responses followed
by an error response with errnum == ENODATA (like EOF).

1) Call flux_rpc_get() in a loop, with flux_future_reset()
after each successful call.  Verify that the requetested
number of responses was received.

2) Set up a continuation that calls flux_future_reset()
after a successful flux_rpc_get().  On failure, verify
that the requested number of responses was received.

3) Like #2 except handle the first response in one
continuation, and subsequent responses in another.
It covers calling flux_future_then() a second time on
a future.
grondo pushed a commit that referenced this pull request Sep 10, 2019
travis-ci: fix docker tag deploy for v0.11 branch, backport other docker fixes
garlick pushed a commit that referenced this pull request Feb 6, 2021
Problem: On Fedora 33 (Lua 5.4), the testsuite occaisonally fails
with the error:

 lua: /usr/src/src/cmd/flux-cron:72:
    bad argument #2 to 'fmt' (number has no integer representation)
 stack traceback:
        [C]: in function 'string.format'
        /usr/src/src/cmd/flux-cron:72: in upvalue 'reladate'
        /usr/src/src/cmd/flux-cron:497: in field 'handler'
        /usr/src/src/bindings/lua/flux/Subcommander.lua:133:
            in function </usr/src/src/bindings/lua/flux/Subcommander.lua:114>
        (...tail calls...)
        /usr/src/src/cmd/flux-cron:580: in main chunk
        [C]: in ?

This is due to the line:

        return fmt ("%d seconds ago", diff)

Workaround the problem by printing the result of `math.floor(diff +
0.5)`, essentially rounding diff to the nearest integer.
chu11 pushed a commit to chu11/flux-core that referenced this pull request Oct 20, 2021
Problem: On centos8 some of the tests in t0016-cron-faketime.t
fail with the following error:

 lua: /usr/src/src/cmd/flux-cron:102:
   bad argument flux-framework#2 to 'fmt' (number has no integer representation)

Coerce values to integer using math.floor when %d is used in string.format
to avoid this error.
chu11 pushed a commit to chu11/flux-core that referenced this pull request Nov 16, 2021
Problem: On centos8 some of the tests in t0016-cron-faketime.t
fail with the following error:

 lua: /usr/src/src/cmd/flux-cron:102:
   bad argument flux-framework#2 to 'fmt' (number has no integer representation)

Coerce values to integer using math.floor when %d is used in string.format
to avoid this error.
chu11 pushed a commit to chu11/flux-core that referenced this pull request Nov 23, 2021
Problem: On centos8 some of the tests in t0016-cron-faketime.t
fail with the following error:

 lua: /usr/src/src/cmd/flux-cron:102:
   bad argument flux-framework#2 to 'fmt' (number has no integer representation)

Coerce values to integer using math.floor when %d is used in string.format
to avoid this error.
chu11 pushed a commit to chu11/flux-core that referenced this pull request Nov 23, 2021
Problem: On centos8 some of the tests in t0016-cron-faketime.t
fail with the following error:

 lua: /usr/src/src/cmd/flux-cron:102:
   bad argument flux-framework#2 to 'fmt' (number has no integer representation)

Coerce values to integer using math.floor when %d is used in string.format
to avoid this error.
chu11 pushed a commit to chu11/flux-core that referenced this pull request Dec 13, 2021
Problem: On centos8 some of the tests in t0016-cron-faketime.t
fail with the following error:

 lua: /usr/src/src/cmd/flux-cron:102:
   bad argument flux-framework#2 to 'fmt' (number has no integer representation)

Coerce values to integer using math.floor when %d is used in string.format
to avoid this error.
chu11 pushed a commit to chu11/flux-core that referenced this pull request Dec 13, 2021
Problem: On centos8 some of the tests in t0016-cron-faketime.t
fail with the following error:

 lua: /usr/src/src/cmd/flux-cron:102:
   bad argument flux-framework#2 to 'fmt' (number has no integer representation)

Coerce values to integer using math.floor when %d is used in string.format
to avoid this error.
mergify bot pushed a commit that referenced this pull request Dec 22, 2021
Problem: On centos8 some of the tests in t0016-cron-faketime.t
fail with the following error:

 lua: /usr/src/src/cmd/flux-cron:102:
   bad argument #2 to 'fmt' (number has no integer representation)

Coerce values to integer using math.floor when %d is used in string.format
to avoid this error.
garlick added a commit to garlick/flux-security that referenced this pull request Aug 10, 2023
Problem: if a compute node cannot resolve the target userid,
the imp segfaults due to an unchecked error condition:

  #0  0x000000556a7a7680 imp_exec_privileged (flux-imp + 0x7680)
  flux-framework/flux-core#1  0x000000556a7a3b3c imp_parent (flux-imp + 0x3b3c)
  flux-framework/flux-core#2  0x0000007fac65fe18 __libc_start_main (libc.so.6 + 0x20e18)
  flux-framework/flux-core#3  0x000000556a7a3c18 $x (flux-imp + 0x3c18)
  flux-framework/flux-core#4  0x000000556a7a3c18 $x (flux-imp + 0x3c18)

Check for userid lookup failure and print a helpful message, then die.

Fixes flux-framework#170
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

Successfully merging this pull request may close these issues.

2 participants