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

Job Failure Explanations job_explanation field not shown #8995

Closed
hjkatz opened this issue Jan 4, 2021 · 2 comments
Closed

Job Failure Explanations job_explanation field not shown #8995

hjkatz opened this issue Jan 4, 2021 · 2 comments

Comments

@hjkatz
Copy link
Contributor

hjkatz commented Jan 4, 2021

ISSUE TYPE
  • Bug Report
SUMMARY

The Job's job_explanation field is not shown in any of the following places:

  • DEBUG log output of awx-task (this is the entire log output of awx-task when the Job is launched)

    2021-01-04 15:07:46,899 DEBUG    awx.main.dispatch task 3db3b909-6685-4229-8cb9-9a14091938ad starting 
    awx.main.tasks.update_inventory_computed_fields(*[45])
    2021-01-04 15:07:46,929 DEBUG    awx.main.models.inventory Going to update inventory computed fields, pk=45
    2021-01-04 15:07:46,955 DEBUG    awx.main.models.inventory Finished updating inventory computed fields, pk=45, in 
    0.026 seconds
    2021-01-04 15:07:48,006 DEBUG    awx.main.dispatch task 86444b59-5f3f-43f5-bf57-c0677a14c6d2 starting 
    awx.main.scheduler.tasks.run_task_manager(*[])
    2021-01-04 15:07:48,008 DEBUG    awx.main.scheduler Running Tower task manager.
    2021-01-04 15:07:48,032 DEBUG    awx.main.scheduler Starting Scheduler
    2021-01-04 15:07:48,275 DEBUG    awx.main.scheduler Finishing Scheduler
  • Details of failed Job UI page
    image

  • Output of failed Job UI page
    image

  • Downloaded output of failed Job UI page (empty)

This makes debugging jobs very difficult.

ENVIRONMENT
  • AWX version: 16.0.0
  • AWX install method: kubernetes
EXPECTED RESULTS

I expect to see job_explanation such as

Job cannot start because Credential Shared Ansible Vault Password does not provide one or more required fields (vault_password). Task failed pre-start check.
To be visible somewhere in the UI

ADDITIONAL INFORMATION

Failed Job JSON from API:

{
    "id": 249,
    "type": "job",
    "url": "/api/v2/jobs/249/",
    "related": { ... },
    "summary_fields": {
        "organization": { ... },
        "inventory": {
            "id": 45,
            "name": "testing inventory.stage",
            "description": "",
            "has_active_failures": true,
            "total_hosts": 1218,
            "hosts_with_active_failures": 1,
            "total_groups": 684,
            "has_inventory_sources": true,
            "total_inventory_sources": 1,
            "inventory_sources_with_failures": 0,
            "organization_id": 1,
            "kind": ""
        },
        "project": {
            "id": 53,
            "name": "testing shared ansible repo",
            "description": "",
            "status": "successful",
            "scm_type": "git"
        },
        "job_template": {
            "id": 55,
            "name": "test job",
            "description": ""
        },
        "unified_job_template": {
            "id": 55,
            "name": "test job",
            "description": "",
            "unified_job_type": "job"
        },
        "created_by": {
            "id": 1,
            "username": "admin",
            "first_name": "",
            "last_name": ""
        },
        "modified_by": {
            "id": 1,
            "username": "admin",
            "first_name": "",
            "last_name": ""
        },
        "user_capabilities": {
            "delete": true,
            "start": true
        },
        "labels": {
            "count": 0,
            "results": []
        },
        "credentials": [
            {
                "id": 6,
                "name": "Shared Ansible Vault Password",
                "description": "Shared Ansible Vault Password for Shared ansible repo",
                "kind": "vault",
                "cloud": false
            }
        ]
    },
    "created": "2021-01-04T15:07:46.867281Z",
    "modified": "2021-01-04T15:07:48.252037Z",
    "name": "test job",
    "description": "",
    "job_type": "run",
    "inventory": 45,
    "project": 53,
    "playbook": "playbooks/test_group_vars.yaml",
    "scm_branch": "",
    "forks": 0,
    "limit": "",
    "verbosity": 3,
    "extra_vars": "{\"hosts\": [\"example.host.com\"]}",
    "job_tags": "",
    "force_handlers": false,
    "skip_tags": "",
    "start_at_task": "",
    "timeout": 0,
    "use_fact_cache": false,
    "organization": 1,
    "unified_job_template": 55,
    "launch_type": "relaunch",
    "status": "failed",
    "failed": true,
    "started": null,
    "finished": "2021-01-04T15:07:48.251821Z",
    "canceled_on": null,
    "elapsed": 0.0,
    "job_args": "",
    "job_cwd": "",
    "job_env": {},
    "job_explanation": "Job cannot start because Credential Shared Ansible Vault Password does not provide one or more required fields (vault_password). Task failed pre-start check.",
    "execution_node": "",
    "controller_node": "",
    "result_traceback": "",
    "event_processing_finished": true,
    "job_template": 55,
    "passwords_needed_to_start": [],
    "allow_simultaneous": true,
    "artifacts": {},
    "scm_revision": "",
    "instance_group": null,
    "diff_mode": false,
    "job_slice_number": 0,
    "job_slice_count": 1,
    "webhook_service": "",
    "webhook_credential": null,
    "webhook_guid": "",
    "host_status_counts": {},
    "playbook_counts": {
        "play_count": 0,
        "task_count": 0
    },
    "custom_virtualenv": null
}```
@unlikelyzero
Copy link

unlikelyzero commented Jan 4, 2021

@hjkatz thanks for filing this issue. We have an existing issue to cover this missing functionality: #8709 Please subscribe to it for updates and let us know on that ticket if there's any other missing fields!

AWX PF automation moved this from Backlog to Closed Jan 4, 2021
@hjkatz
Copy link
Contributor Author

hjkatz commented Jan 4, 2021

Thanks! I wasn't sure if the issue was reporting the same UI error, but now I see that it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
AWX PF
  
Closed
Development

No branches or pull requests

2 participants