Generate a diagnostic snapshotΒΆ

To simplify the interaction between development and operation, Decapod supports diagnostic or debug snapshots, similar to Fuel snapshots. A snapshot is an archive that contains all information required to debug and troubleshoot issues.

Snapshots store the following information:

  • Backup of the database
  • Logs from services
  • File docker-compose.yml
  • Configuration files from Decapod services (config.yaml)
  • Datetimes from services
  • Data from ceph-monitoring
  • Version of installed packages
  • Git commit SHAs of Decapod itself
  • Information about docker and containers

Snapshots do not store Ansible private keys or user passwords. Passwords are hashed by Argon2.

To generate a diagnostic snapshot:

Run the script:

$ ./scripts/debug_snapshot.py snapshot

Alternatively, if you have containers only, follow the steps below.

  1. Run the following command:

    $ docker-compose exec -T admin cat /debug-snapshot | python - snapshot
    
  2. Configure the snapshot settings as required:

    $ docker-compose -p myproject exec -T admin cat /debug-snapshot | python - --help
    usage: - [-h] [-f COMPOSE_FILE] [-p PROJECT_NAME] snapshot_path
    
    Create a debug snapshot for Decapod.
    
    positional arguments:
      snapshot_path         Path where to store snapshot (do not append extension,
                            we will do it for you).
    
    optional arguments:
      -h, --help            show this help message and exit
      -f COMPOSE_FILE, --compose-file COMPOSE_FILE
                            path to docker-compose.yml file. (default:
                            /vagrant/docker-compose.yml)
      -p PROJECT_NAME, --project-name PROJECT_NAME
                            the name of the project. (default: vagrant)
    
    Please find all logs in syslog by ident 'decapod-debug-snapshot'.
    
    $ docker-compose -p myproject exec -T admin cat /debug-snapshot | python - -p myproject snapshot
    

As a result, you will get a snapshot like snapshot_path.*. The snapshot tool calculates the best compression algorithm available on your platform and uses its extension. Therefore, the snapshot may look like snapshot_path.tar.bz2 or snapshot_path.tar.xz depending on how your Python was built.