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

Backup: HAProxy #1188

Closed
plirglo opened this issue Apr 23, 2020 · 3 comments · Fixed by #1359
Closed

Backup: HAProxy #1188

plirglo opened this issue Apr 23, 2020 · 3 comments · Fixed by #1359
Assignees

Comments

@plirglo
Copy link
Contributor

plirglo commented Apr 23, 2020

Load balancer backup includes:

  • Configuration files: /etc/haproxy/
  • SSL certificates: /etc/ssl/haproxy/

https://github.com/epiphany-platform/epiphany/blob/develop/docs/home/howto/BACKUP.md

PR #1359

@plirglo plirglo added the size/S label Apr 23, 2020
@plirglo plirglo added this to the Backup/Restore milestone Apr 23, 2020
@sk4zuzu sk4zuzu self-assigned this May 19, 2020
@toszo toszo added size/XS and removed size/S labels May 21, 2020
@sk4zuzu sk4zuzu linked a pull request Jun 16, 2020 that will close this issue
@rafzei
Copy link
Contributor

rafzei commented Jun 22, 2020

I've tested backup/restore of HAProxy configuration - it works as expected.

@rafzei
Copy link
Contributor

rafzei commented Jun 26, 2020

Performing additional tests. For now, I found an issue on RHEL.
The backup script doesn't care about the file type in source location. In the following case the haproxy.cfg file is a slink so only slink is backed up.

Log:

08:49:11 INFO cli.engine.ansible.AnsibleCommand - TASK [recovery : Remove everything from target directories] *******************************************************************************************************************
08:49:13 INFO cli.engine.ansible.AnsibleCommand - changed: [ec2-18-156-178-138.eu-central-1.compute.amazonaws.com] => (item=/etc/haproxy/haproxy.cfg)
08:49:13 INFO cli.engine.ansible.AnsibleCommand -
08:49:13 INFO cli.engine.ansible.AnsibleCommand - TASK [recovery : Extract the archive] *****************************************************************************************************************************************
08:49:16 INFO cli.engine.ansible.AnsibleCommand - fatal: [ec2-18-156-178-138.eu-central-1.compute.amazonaws.com]: FAILED! => {"changed": false, "msg": "path /etc/haproxy/haproxy.cfg does not exist", "path": "/etc/haproxy/haproxy.cfg"}
08:49:16 INFO cli.engine.ansible.AnsibleCommand -
08:49:16 INFO cli.engine.ansible.AnsibleCommand - PLAY RECAP ********************************************************************************************************************************************************************
08:49:16 INFO cli.engine.ansible.AnsibleCommand - ec2-18-156-178-138.eu-central-1.compute.amazonaws.com : ok=29 changed=7 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

OS:

  • Red Hat Enterprise Linux Server release 7.8 (Maipo)

Installed packages:

  • rh-haproxy18.x86_64 3.1-2.el7 epirepo
  • rh-haproxy18-haproxy.x86_64 1.8.24-2.el7 epirepo
  • rh-haproxy18-haproxy-syspaths.x86_64
  • rh-haproxy18-runtime.x86_64 3.1-2.el7 epirepo

rpm -ql rh-haproxy18-haproxy:

  • {..}
  • /etc/opt/rh/rh-haproxy18/haproxy
  • /etc/opt/rh/rh-haproxy18/haproxy/haproxy.cfg
  • {..}

ls -l /etc/haproxy/haproxy.cfg:

  • lrwxrwxrwx. 1 root root 44 Jun 26 07:11 /etc/haproxy/haproxy.cfg -> /etc/opt/rh/rh-haproxy18/haproxy/haproxy.cfg

tar tvf haproxy_etc_20200626-081729.tar.gz:

  • lrwxrwxrwx root/root 0 2020-06-26 07:11 haproxy/haproxy.cfg -> /etc/opt/rh/rh-haproxy18/haproxy/haproxy.cfg
  • -rw-r--r-- root/root 5045 2020-06-26 07:11 ssl/haproxy/self-signed-test.tld.pem

test steps:

  • Fresh deployment
  • Backup HAproxy configuration x3
  • Changes in a configuration file
  • Restore backup:
    1. From 'latest'
  • Changes in a configuration file
  • Restore backup:
    1. From specific timestamp

@sk4zuzu
Copy link
Contributor

sk4zuzu commented Jun 26, 2020

@rafzei please take a look at this PR #1390 it should resolve the issue 👍

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 a pull request may close this issue.

4 participants