linsomniac / drbdlinks Goto Github PK
View Code? Open in Web Editor NEWA helper for DRBD which makes/reverts links into DRBD volumes.
License: GNU General Public License v2.0
A helper for DRBD which makes/reverts links into DRBD volumes.
License: GNU General Public License v2.0
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.
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.
Would it be possible to extend the restart/reload logic present today for syslog/syslog-ng/rsyslog & cron to any arbitrary service?
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)
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.