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

task ls --completed --json missing TASK_FAILED tasks #141

Closed
nickbp opened this issue Sep 22, 2016 · 3 comments
Closed

task ls --completed --json missing TASK_FAILED tasks #141

nickbp opened this issue Sep 22, 2016 · 3 comments

Comments

@nickbp
Copy link
Contributor

nickbp commented Sep 22, 2016

nick@augustao:~$ dcos task ls --completed --json
[]

nick@augustao:~$ dcos --version
dcoscli.version=0.4.12
dcos.version=1.8-dev
dcos.commit=02e6c655efdafca6f3336d25f7e5344bf35f6ca6
dcos.bootstrap-id=c8b4c4578211a1608391b53ab0a30a5b044215aa

Meanwhile state.json contains many tasks like this in a TASK_FAILED state:

{
    "id": "exiter.b7b4ed4a-80f1-11e6-ab75-225d308e1d52",
    "name": "exiter",
    "framework_id": "38300900-14bd-49f5-a8d1-06d3a9473ed9-0000",
    "executor_id": "",
    "slave_id": "38300900-14bd-49f5-a8d1-06d3a9473ed9-S0",
    "state": "TASK_FAILED",
    "resources": {
        "disk": 0.0,
        "mem": 32.0,
        "gpus": 0.0,
        "cpus": 0.1,
        "ports": "[7250-7250]"
    },
    "statuses": [{
        "state": "TASK_RUNNING",
        "timestamp": 1474568634.36154,
        "container_status": {
            "network_infos": [{
                "ip_addresses": [{
                    "ip_address": "10.0.1.203"
                }]
            }]
        }
    }, {
        "state": "TASK_FAILED",
        "timestamp": 1474568639.57595,
        "container_status": {
            "network_infos": [{
                "ip_addresses": [{
                    "ip_address": "10.0.1.203"
                }]
            }]
        }
    }],
    "labels": [{
        "key": "DCOS_SPACE",
        "value": "\/exiter"
    }],
    "discovery": {
        "visibility": "FRAMEWORK",
        "name": "exiter",
        "ports": {
            "ports": [{
                "number": 7250,
                "protocol": "tcp"
            }]
        }
    }
}, [...]
@nickbp
Copy link
Contributor Author

nickbp commented Sep 22, 2016

Can create FAILED tasks by starting a marathon job with sleep 5 && exit 1 as its command.

@tamarrow-zz
Copy link
Contributor

@nickbp tried a marathon job with that command and the apps appeared in task ls --completed. Can you still repro?

@nickbp
Copy link
Contributor Author

nickbp commented Oct 21, 2016

create marathon job as:

{
  "id": "errory",
  "cmd": "sleep 5 && exit 1",
  "cpus": 1,
  "mem": 32,
  "disk": 0,
  "instances": 1
}

observe that job starts fail-looping, leaving TASK_FAILED entries in state.json

then go into the CLI and run --completed, with and without --json. get inconsistent results:

nick@augustao:~$ dcos --version
dcoscli.version=0.4.14
dcos.version=1.9-dev
dcos.commit=f192f09940979abd1aab19c558426a9787ae0f28
dcos.bootstrap-id=55c0e6727a635d480bdb3dfb81df8e69a82667e0

nick@augustao:~$ dcos task ls --completed
===> errory.e5725f2f-9729-11e6-93f5-be00ef0b5a29 <===
stderr  stderr.logrotate.conf  stdout  stdout.logrotate.conf
===> errory.e9453920-9729-11e6-93f5-be00ef0b5a29 <===
stderr  stderr.logrotate.conf  stdout  stdout.logrotate.conf
===> errory.ed01cbf1-9729-11e6-93f5-be00ef0b5a29 <===
stderr  stderr.logrotate.conf  stdout  stdout.logrotate.conf
===> errory.f0cf9cd2-9729-11e6-93f5-be00ef0b5a29 <===
stderr  stderr.logrotate.conf  stdout  stdout.logrotate.conf

nick@augustao:~$ dcos task ls --completed --json
[]

list is empty when --json is provided

@armandgrillet armandgrillet transferred this issue from dcos/dcos-cli Jan 15, 2019
@nickbp nickbp closed this as completed Jul 23, 2019
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

2 participants