Code Monkey home page Code Monkey logo

Comments (8)

evrardjp avatar evrardjp commented on May 24, 2024

I'll verify this today.

from ansible-keepalived.

evrardjp avatar evrardjp commented on May 24, 2024

I didn't change anything on my system, and the service auto starts on boot.
Are you sure it's the ".service" that fixed your issue?

from ansible-keepalived.

evrardjp avatar evrardjp commented on May 24, 2024

Could it be possible that something happened during your first run, and the override to prevent restart was still there?

https://github.com/evrardjp/ansible-keepalived/blob/master/tasks/keepalived_install_apt.yml#L67-L83

from ansible-keepalived.

jardleex avatar jardleex commented on May 24, 2024

I think I know what happened here.

I deploy the systemd unit file from keepalived version 1.2.24 in a dedicated task as the current version 1.2.23 does not provide one and I had issues on that in the beginning.

When I use the role naked I get:

root@dnsmasq03:~# systemctl status keepalived
● keepalived.service - LSB: Starts keepalived
● keepalived.service - LSB: Starts keepalived
● keepalived.service - LSB: Starts keepalived
   Loaded: loaded (/etc/init.d/keepalived; bad; vendor preset: enabled)
   Active: active (running) since Di 2017-01-31 14:25:51 UTC; 9s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1037 ExecStart=/etc/init.d/keepalived start (code=exited, status=0/SUCCESS)
    Tasks: 18
   Memory: 10.7M
      CPU: 189ms
   CGroup: /system.slice/keepalived.service
           ├─1072 /usr/sbin/keepalived
           ├─1073 /usr/sbin/keepalived
           ├─1074 /usr/sbin/keepalived
....

With this the autostart works indeed.

I do in addition:

    - name: GET_URL | fetch systemd unit file not included in 1.2.23 yet
      get_url:
        url: 'https://raw.githubusercontent.com/acassen/keepalived/v1.2.24/keepalived/keepalived.service'
        dest: '/etc/systemd/system/keepalived.service'
        checksum: 'md5:da851c03bcedafc35129078ba5046e06'
        mode: 0644
      notify:
        - reload systemd
        - restart keepalived

Which leads to:

● keepalived.service - LVS and VRRP High Availability Monitor
   Loaded: loaded (/etc/systemd/system/keepalived.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2017-01-31 13:05:52 UTC; 1h 23min ago
  Process: 24278 ExecStart=/usr/sbin/keepalived $KEEPALIVED_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 24279 (keepalived)
    Tasks: 3
   Memory: 4.1M
      CPU: 3min 21.136s
   CGroup: /system.slice/keepalived.service
           ├─24279 /usr/sbin/keepalived -D
           ├─24281 /usr/sbin/keepalived -D
           └─24282 /usr/sbin/keepalived -D

Here it helped me to set keepalived_service_name: "keepalived.service" in vars/ubuntu-16.04.yml. But as it is define in vars, I can't override it my group or host_vars Variable precedence.

So the issue is related to the fact that I use a dedicated systemd unit file instead of the default init script.
I assume when keepalived version 1.2.24 is in the PPA more people may face the issue.

from ansible-keepalived.

evrardjp avatar evrardjp commented on May 24, 2024

Sadly I can't reproduce this. I'll spend more time on this this week-end.

from ansible-keepalived.

evrardjp avatar evrardjp commented on May 24, 2024

You are right, it depends on the ppa version.
For safety reasons, I'll use keepalived.service forward. It works for me and for you.

from ansible-keepalived.

evrardjp avatar evrardjp commented on May 24, 2024

Ok the fix is in, I'll bump the version today.

from ansible-keepalived.

evrardjp avatar evrardjp commented on May 24, 2024

Really sorry for all the wait.
You can now fetch the latest version of the role using ansible-galaxy.

from ansible-keepalived.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.