Coder Social home page Coder Social logo

drbdlinks's People

Contributors

flaviogrossi avatar linsomniac avatar robert-scheck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

drbdlinks's Issues

Python 3 support?

Python 2.7 will not be maintained past 2020, so drbdlinks should support Python 3…and if it does, it should be reflected in the documentation.

drbdlinks doesn't claim if managed symlink is a file (rather a symlink)

If my /etc/drbdlinks.conf contains

mountpoint('/drbd')
link('/etc/crontab')

unfortunately drbdlinks status still says

$ drbdlinks status
info: DRBD Links OK (present)
$ 

even if it looks like this

$ ls -l /etc/crontab /drbd/etc/crontab
-rw-r--r--. 1 root root 1699 Apr  9 08:10 /etc/crontab
-rw-r--r--. 1 root root 1751 Apr  9 08:04 /drbd/etc/crontab
$ 

while it should be

$ ls -l /etc/crontab /drbd/etc/crontab
lrwxrwxrwx. 1 root root   24 Apr 17 10:09 /etc/crontab -> /drbd/etc/crontab
-rw-r--r--. 1 root root 1751 Apr  9 08:04 /drbd/etc/crontab
$ 

In this case, something dereferenced /etc/crontab symlink outside of drbdlinks by accident, but drbdlinks does not detect this scenario (unfortunately). Note, this also could happen for a directory, so the check likely should be if managed symlink is really a symlink.

Ease configuration configuration automation with /etc/drbdlinks.d/

I am writing Ansible playbook to automate my DRBD setup and I will include multiple roles on a single system. As a result, each role will have to append drbdlinks configuration with its own link directive.

The usual way to ease such modular configuration is to include files available in a .d configuration directory.

Here is a work-around I have implemented directly at the end of drbdlinks.conf because I found out it was passed through execfile

import glob
for conf in glob.iglob('/etc/drbdlinks.d/*.conf'):
    execfile(conf)

Troubles with initialize_shared_storage and trailing / in link

It took me a while to figure out that the trailing / at the end of my directive

link('/var/lib/postgresql/')

was the reason why initialize_shared_storage failed to detect lacking target directories and just aborted its copy tentative.

It would be an interesting improvement to discard trailing slash if present in link declaration or else to abort early with dedicated error message.

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.