Uploaded image for project: 'DC/OS'
  1. DC/OS
  2. DCOS_OSS-3302

Metronome CLI Kill command fails with lack of job run id

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: metronome
    • Labels:
      None
    • Story Points:
      2

      Description

      dcos job kill <job_id> fails with no run id or --all flag.   One or the other should be required.   Currently if not provided a stack trace is sent to stdout.   This should NOT match and should provide dcos job help message.

       

      dcos job kill foo
      
      Traceback (most recent call last):
      
        File "/Users/kensipe/projects/dcos-cli/python/lib/dcoscli/dcoscli/subcommand.py", line 101, in run_and_capture
      
          exit_code = m.main([self._command] + self._args)
      
        File "/Users/kensipe/projects/dcos-cli/python/lib/dcoscli/dcoscli/job/main.py", line 40, in main
      
          return _main(argv)
      
        File "/Users/kensipe/projects/dcos-cli/python/lib/dcoscli/dcoscli/util.py", line 24, in wrapper
      
          result = func(*args, **kwargs)
      
        File "/Users/kensipe/projects/dcos-cli/python/lib/dcoscli/dcoscli/job/main.py", line 61, in _main
      
          return cmds.execute(_cmds(), args)
      
        File "/Users/kensipe/projects/dcos-cli/python/lib/dcos/dcos/cmds.py", line 43, in execute
      
          return function(*params)
      
        File "/Users/kensipe/projects/dcos-cli/python/lib/dcoscli/dcoscli/job/main.py", line 247, in _kill
      
          client.kill_run(job_id, dead)
      
        File "/Users/kensipe/projects/dcos-cli/python/lib/dcos/dcos/metronome.py", line 343, in kill_run
      
          run_id = util.normalize_marathon_id_path(run_id)
      
        File "/Users/kensipe/projects/dcos-cli/python/lib/dcos/dcos/util.py", line 711, in normalize_marathon_id_path
      
          return urllib.parse.quote('/' + id_path.strip('/'))
      
      AttributeError: 'NoneType' object has no attribute 'strip'

        Attachments

          Activity

            People

            • Assignee:
              ken Ken Sipe
              Reporter:
              ken Ken Sipe
              Team:
              Orchestration Team
              Watchers:
              Ken Sipe
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: