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

tdp deploy doesn't update database #485

Closed
giem-git opened this issue Oct 27, 2023 · 3 comments
Closed

tdp deploy doesn't update database #485

giem-git opened this issue Oct 27, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@giem-git
Copy link

Description

  • tdp_lib database is not updated on fail.
  • It also looks like the database is not updated immediately for success operations. (a select in database a long time after success shows first operations status still 'PLANNED'
  • This behavior appeared in commit cde5e14

Reproducing :

  • break the first planned role (in my configuration, I change indentation in tdp/ansible/ansible_collections/tosit/tdp/roles/exporter/jmx/tasks/install.yml)
  • cleanup : rm sqlite.db && tdp init
  • deploy : we expect this to fail
    (tdp-ops) > $ tdp plan dag && tdp deploy
    2023-10-27 10:16:57,383 - INFO - root - Logging is configured.
    Creating a deployment plan for the whole DAG.
    Deployment plan successfully created.
    2023-10-27 10:16:58,289 - INFO - root - Logging is configured.
    ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
    JSON: Expecting value: line 1 column 1 (char 0)
    
    Syntax Error while loading YAML.
      mapping values are not allowed in this context
    
    The error appears to be in 'xxx/dev/tdp-ops/tdp/ansible/ansible_collections/tosit/tdp/roles/exporter/jmx/tasks/install.yml': line 23, column 25, but may
    be elsewhere in the file depending on the exact syntax problem.
    
    The offending line appears to be:
    
    - name: Create symbolic link to jmx exporter jar
        ansible.builtin.file:
                            ^ here
    
    
  • browse logs :
    (tdp-ops) > $ tdp browse 
    2023-10-27 10:20:16,894 - INFO - root - Logging is configured.
      id  start_time           end_time    status    deployment_type
    ----  -------------------  ----------  --------  -----------------
       1  2023-10-27 10:16:58              RUNNING   DAG
                                                                                                                                                                                                        
    (tdp-ops) > $ tdp browse 1 |head -20
    2023-10-27 10:21:03,933 - INFO - root - Logging is configured.
    Deployment details
    id               1
    options          {}
    start_time       2023-10-27 10:16:58
    end_time
    status           RUNNING
    deployment_type  DAG
    
    
    Operations
      deployment_id    operation_order  operation                                 host    extra_vars    start_time    end_time    state    logs
    ---------------  -----------------  ----------------------------------------  ------  ------------  ------------  ----------  -------  ------
                  1                  1  exporter_jmx_install                                                                      PLANNED
                  1                  2  exporter_node_install                                                                     PLANNED
                  1                  3  exporter_postgres_install                                                                 PLANNED
                  1                  4  exporter_install                                                                          PLANNED
                  1                  5  zookeeper_client_install                                                                  PLANNED
                  1                  6  zookeeper_server_install                                                                  PLANNED
                  1                  7  zookeeper_kerberos_install                                                                PLANNED
                  1                  8  zookeeper_install                                                                         PLANNED
    
    

As a result, tdp resume fails with following error : tdp.core.models.deployment_log.NothingToResumeError: Nothing to resume, deployment #1 was Running.

@PaulFarault PaulFarault added the bug Something isn't working label Oct 27, 2023
@PaulFarault
Copy link
Contributor

Thanks for the issue. I'll have a look at it!

@PaulFarault
Copy link
Contributor

This should have been fixed by #499 and #500. Would you be able to check please?

@giem-git
Copy link
Author

This should have been fixed by #499 and #500. Would you be able to check please?

Issue is solved. Thanks !

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