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

Add basic postgres.server.remove state #182

Closed
wants to merge 31 commits into from
Closed

Add basic postgres.server.remove state #182

wants to merge 31 commits into from

Conversation

noelmcloughlin
Copy link
Member

@noelmcloughlin noelmcloughlin commented Jan 17, 2018

This adds new postgres.server.remove, postgres.client.remove states to the formula. Please review and provide feedback or merge if approved. Thanks.

The DB directory (i.e. postgres.conf_dir) is not explicitly removed by the formula.

Upstream remove

          ID: postgresql-repo-removed
    Function: pkgrepo.absent
        Name: deb http://apt.postgresql.org/pub/repos/apt xenial-pgdg main 9.6
      Result: True
     Comment: Removed repo deb http://apt.postgresql.org/pub/repos/apt xenial-pgdg main 9.6, and keyid ACCC4CF8
     Started: 15:48:23.883788
    Duration: 5301.947 ms
     Changes:   
              ----------
              keyid:
                  ACCC4CF8
              repo:
                  deb http://apt.postgresql.org/pub/repos/apt xenial-pgdg main 9.6
----------
          ID: postgresql-notrunning
    Function: service.dead
        Name: postgresql
      Result: True
     Comment: The service postgresql is already dead
     Started: 15:48:30.023758
    Duration: 69.957 ms
     Changes:   
----------
          ID: postgresql-server-removed
    Function: pkg.removed
      Result: True
     Comment: All targeted packages were removed.
     Started: 15:48:30.495447
    Duration: 5205.095 ms
     Changes:   
              ----------
              postgresql-9.6:
                  ----------
                  new:
                  old:
                      9.6.6-1.pgdg16.04+1
              postgresql-contrib-9.6:
                  ----------
                  new:
                  old:
                      9.6.6-1.pgdg16.04+1
              postgresql-plpython:
                  ----------
                  new:
                  old:
                      1
              postgresql-plpython-9.6:
                  ----------
                  new:
                  old:
                      9.6.6-1.pgdg16.04+1
----------
          ID: postgresql-config-removed
    Function: file.absent
        Name: /etc/postgresql/9.6/main
      Result: True
     Comment: File /etc/postgresql/9.6/main is not present
     Started: 15:48:35.712664
    Duration: 1.392 ms
     Changes:   
----------
          ID: postgresql-tablespace-dir-my_space-removed
    Function: file.absent
        Name: /srv/my_tablespace
      Result: True
     Comment: Removed directory /srv/my_tablespace
     Started: 15:48:35.715247
    Duration: 29.948 ms
     Changes:   
              ----------
              removed:
                  /srv/my_tablespace

Summary for local
------------
Succeeded: 5 (changed=3)
Failed:    0
------------
Total states run:     5
Total run time:  10.608 s

Native OS Packages

----------
          ID: postgresql-notrunning
    Function: service.dead
        Name: postgresql
      Result: True
     Comment: Service postgresql has been disabled, and is dead
     Started: 15:19:15.676312
    Duration: 1160.664 ms
     Changes:   
              ----------
              postgresql:
                  True
----------
          ID: postgresql-server-removed
    Function: pkg.removed
      Result: True
     Comment: All targeted packages were removed.
     Started: 15:19:16.920324
    Duration: 2371.527 ms
     Changes:   
              ----------
              postgresql-server:
                  ----------
                  new:
                  old:
                      9.6-1.1
----------
          ID: postgresql-confdir-removed
    Function: file.absent
        Name: /var/lib/pgsql/data
      Result: True
     Comment: unless execution succeeded
     Started: 15:19:19.294008
    Duration: 437.887 ms
     Changes:   
----------
          ID: postgresql-tablespace-dir-my_space-removed
    Function: file.absent
        Name: /srv/my_tablespace
      Result: True
     Comment: Removed directory /srv/my_tablespace
     Started: 15:19:19.732283
    Duration: 0.472 ms
     Changes:   
              ----------
              removed:
                  /srv/my_tablespace
----------
          ID: postgresql-client-dev-removed
    Function: pkg.removed
      Result: True
     Comment: The following packages were not installed: postgresql-devel The following packages were removed: postgresql, python-psycopg2.
     Started: 15:19:19.735944
    Duration: 2156.264 ms
     Changes:   
              ----------
              postgresql:
                  ----------
                  new:
                  old:
                      9.6-1.1
              python-psycopg2:
                  ----------
                  new:
                  old:
                      2.7.3.2-1.sles12

Summary for local
------------
Succeeded: 5 (changed=4)
Failed:    0
------------
Total states run:     5
Total run time:   6.127 s

@noelmcloughlin
Copy link
Member Author

Could someone check this? It's a straightforward patch.

@noelmcloughlin
Copy link
Member Author

Closing to rebase.

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

Successfully merging this pull request may close these issues.

3 participants