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

Introduce backup handler for upgrade #1125

Merged
merged 21 commits into from
Jul 23, 2021

Conversation

alf-cactus
Copy link
Collaborator

link #1032
@tpurschke if this is fine with you I will use handlers for the other roles as well

@alf-cactus alf-cactus requested a review from tpurschke July 19, 2021 15:23
@alf-cactus alf-cactus self-assigned this Jul 19, 2021
Copy link
Contributor

@tpurschke tpurschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

upgrade test (with failing ms dotnet download running on ubuntu 18.04) failed with missing ui dir:

TASK [middleware : set_fact] *********************************************************************************************************************************************************************************
skipping: [fworch-srv]

TASK [middleware : get package list from ms packages-microsoft-prod.deb] *************************************************************************************************************************************
fatal: [fworch-srv]: FAILED! => {"changed": false, "dest": "/usr/local/fworch/middleware/files/packages-microsoft-prod.deb", "elapsed": 10, "msg": "Request failed: <urlopen error [Errno -3] Temporary failure in name resolution>", "url": "https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb"}

RUNNING HANDLER [middleware handler] *************************************************************************************************************************************************************************
changed: [fworch-srv]

PLAY RECAP ***************************************************************************************************************************************************************************************************
fworch-srv                 : ok=95   changed=27   unreachable=0    failed=1    skipped=111  rescued=0    ignored=0   


tim@ubu18test:~/firewall-orchestrator$ ls -l /usr/local/fworch/
total 28
drwxr-xr-x  5 fworch fworch 4096 Jul 19 18:33 database
drwxr-xr-x  3 fworch fworch 4096 Jul 19 18:10 etc
drwxr-xr-x 17 root   root   4096 Jul 19 18:32 fworch_backup
drwxr-xr-x  3 fworch fworch 4096 Jul 19 18:33 lib
drwxr-xr-x  3 fworch fworch 4096 Jul 19 18:34 middleware
drwxr-xr-x  3 root   root   4096 Jul 19 18:33 openldap
drwxr-xr-x  3 fworch fworch 4096 Jul 19 18:11 test
tim@ubu18test:~/firewall-orchestrator$ 

Copy link
Contributor

@tpurschke tpurschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

error with current status on ubuntu 18.04:

tim@ubu18test:~/firewall-orchestrator$ ansible-playbook site.yml -e "testkeys=yes installation_mode=uninstall" -K 
BECOME password: 
ERROR! conflicting action statements: ansible.posix.synchronize, delegate

The error appears to be in '/home/tim/firewall-orchestrator/roles/middleware/tasks/main.yml': line 11, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


  - name: backup middleware dir
    ^ here
tim@ubu18test:~/firewall-orchestrator$ 

@alf-cactus
Copy link
Collaborator Author

The only thing missing is the guarantee that all dirs are present. I get errors when i.e. ui dir is missing

Copy link
Contributor

@tpurschke tpurschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking much better
after a mw server restart, the failed upgrade is working
can you add a (mw) server restart?

Copy link
Contributor

@tpurschke tpurschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: in case of failed upgrade, could we print out a warning at the very end, e.g.
middleware server could not be upgraded (due to connectivity issues with Microsoft), please try to run the upgrade later.

@alf-cactus alf-cactus requested a review from tpurschke July 22, 2021 12:19
@alf-cactus
Copy link
Collaborator Author

Works as intended for ubuntu 20.04

Copy link
Contributor

@tpurschke tpurschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test with ubuntu 18.04 was also successful

@alf-cactus alf-cactus merged commit 5ae02d1 into CactuseSecurity:develop Jul 23, 2021
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.

2 participants