Skip to content

Autogl preserve flag doesn't preserve #5

@damianharouff

Description

@damianharouff

On the current iteration of autogl, the --preserve flag doesn't seem to be evaluated in the script, with the result that preserve doesn't.

Starting docker containers, from a previous iteration of the script:

root@gl-stonex-accounting:/home/damian# docker ps -a
CONTAINER ID   IMAGE                                COMMAND                  CREATED        STATUS                   PORTS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     NAMES
ca5a0de597b3   graylog/graylog-enterprise:5.2.5-1   "/usr/bin/tini -- wa…"   3 months ago   Up 6 minutes (healthy)   0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:514->514/tcp, :::514->514/tcp, 0.0.0.0:5044->5044/tcp, 0.0.0.0:514->514/udp, :::5044->5044/tcp, :::514->514/udp, 0.0.0.0:5050->5050/tcp, 0.0.0.0:5050->5050/udp, :::5050->5050/tcp, :::5050->5050/udp, 0.0.0.0:5555-5557->5555-5557/tcp, :::5555-5557->5555-5557/tcp, 0.0.0.0:9000->9000/tcp, 0.0.0.0:5555->5555/udp, :::9000->9000/tcp, :::5555->5555/udp, 0.0.0.0:12201->12201/tcp, :::12201->12201/tcp, 0.0.0.0:12201->12201/udp, :::12201->12201/udp   root-graylog-1
d86e7b39d698   opensearchproject/opensearch:2       "./opensearch-docker…"   3 months ago   Up 6 minutes             9300/tcp, 9600/tcp, 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9650/tcp                                                                                                                                                                                                                                                                                                                                                                                                                                   opensearch
c85304f49ede   mongo:6                              "docker-entrypoint.s…"   3 months ago   Up 6 minutes             27017/tcp                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 root-mongodb-1
root@gl-stonex-accounting:/home/damian#

Pulling and running current version of script with --preserve flag:

image

The script asks me if I want to delete everything. Typing n here will still result in everything being deleted:

image

The notice about using the preserve flag after responding n here will not be seen, because the screen is cleared moments later:

image

There is a log entry that we're preserving the existing docker environment:

image

The rest of the install proceeds as expected for the script. Once complete, my previous Docker containers are missing, and replaced with a fresh install:

image

Near as I can tell, the $PRESERVE variable is never evaluated in the script, other than for logging that it was set:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions