For a while, I've been wanting to set up configuration management for my home network.
With half a dozen servers, a VPS and a workstation it is not big, but large
enough to make it annoying to manually log into each machine for network-wide changes.
Most of the servers I have are low-end ARM machines, each responsible for a
couple of tasks. Most of my machines run Debian or something derived from Debian.
Oh, and I'm a member of the declarative school of configuration management.
Propellor
Propellor caught my eye earlier this year. Unlike some other configuration
management tools, it doesn't come with its own custom language but it is
written in Haskell, which I am already familiar with. It's also fairly simple,
declarative, and seems to do most of the handful of things that I need.
Propellor is essentially a Haskell application that you customize for your site.
It works very similar to e.g. xmonad, where you write a bit of Haskell code
for configuration which uses the upstream library code. When you run the
application it takes your code and builds a binary from your code and
the upstream libraries.
Each host on which Propellor is used keeps a clone of the site-local Propellor git
repository in /usr/local/propellor. Every time propellor runs
(either because of a manual "spin", or from a cronjob it can set up for you), it
fetches updates from the main site-local git repository, compiles the Haskell
application and runs it.
Setup
Propellor was surprisingly easy to set up. Running propellor
creates a clone of the upstream repository under ~/.propellor with a README
file and some example configuration. I copied config-simple.hs to
config.hs, updated it to reflect one of my hosts and within a few minutes I
had a basic working propellor setup.
You can use ./propellor <host> to trigger a run on a remote host.
At the moment I have propellor working for some basic things -
having certain Debian packages installed, a specific network configuration, mail
setup, basic Kerberos configuration and certain SSH options set.
This took surprisingly little time to set up, and it's been great being able
to take full advantage of Haskell.
Propellor comes with convenience functions for dealing with some commonly used
packages, such as Apt, SSH and Postfix. For a lot of the other packages, you'll
have to roll your own for now. I've written some extra code to make Propellor deal
with Kerberos keytabs and Dovecot, which I hope to submit upstream.
I don't have a lot of experience with other Free Software configuration
management tools such as Puppet and Chef, but for my use case Propellor works
very well.
The main disadvantage of propellor for me so far is that it needs to build
itself on each machine it runs on. This is fine for my workstation and
high-end servers, but it is somewhat more problematic on e.g. my Raspberry Pi's.
Compilation takes a while, and the Haskell compiler and libraries it needs amount
to 500Mb worth of disk space on the tiny root partition.
In order to work with Propellor, some Haskell knowledge is required.
The Haskell in the configuration file is reasonably easy to understand if you
keep it simple, but once the compiler spits out error messages then I suspect
you'll have a hard time without any Haskell knowledge.
Propellor relies on having a central repository with the configuration that it
can pull from as root. Unlike Joey, I am wary of publishing the configuration
of my home network and I don't have a highly available local git server setup.
A little more than 2 years ago, the
Ceilometer project was launched inside
the OpenStack ecosystem. Its main objective was to measure OpenStack cloud
platforms in order to provide data and mechanisms for functionalities such
as billing, alarming or capacity planning.
In this article, I would like to relate what I've been doing with other
Ceilometer developers in the last 5 months. I've lowered my involvement in
Ceilometer itself directly to concentrate on solving one of its biggest
issue at the source, and I think it's largely time to take a break and talk
about it.
Ceilometer early design
For the last years, Ceilometer didn't change in its core architecture.
Without diving too much in all its parts, one of the early design decision
was to build the metering around a data structure we called samples. A
sample is generated each time Ceilometer measures something. It is composed
of a few fields, such as the the resource id that is metered, the user and
project id owning that resources, the meter name, the measured value, a
timestamp and a few free-form metadata. Each time Ceilometer measures
something, one of its components (an agent, a pollster ) constructs and
emits a sample headed for the storage component that we call the
collector.
This collector is responsible for storing the samples into a database. The
Ceilometer collector uses a pluggable storage system, meaning that you can
pick any database system you prefer. Our original implementation has been
based on MongoDB from the beginning, but we then added a SQL driver, and
people contributed things such as HBase or DB2 support.
The REST API exposed by Ceilometer allows to execute various reading
requests on this data store. It can returns you the list of resources that
have been measured for a particular project, or compute some statistics on
metrics. Allowing such a large panel of possibilities and having such a
flexible data structure allows to do a lot of different things with
Ceilometer, as you can almost query the data in any mean you want.
The scalability issue
We soon started to encounter scalability issues in many of the read requests
made via the REST API. A lot of the requests requires the data storage to do
full scans of all the stored samples. Indeed, the fact that the API allows
you to filter on any fields and also on the free-form metadata (meaning non
indexed key/values tuples) has a terrible cost in terms of performance (as
pointed before, the metadata are attached to each sample generated by
Ceilometer and is stored as is). That basically means that the sample data
structure is stored in most drivers in just one table or collection, in
order to be able to scan them at once, and there's no good "perfect"
sharding solution, making data storage scalability painful.
It turns out that the Ceilometer REST API is unable to handle most of the
requests in a timely manner as most operations are O(n) where n is the
number of samples recorded (see
big O notation if you're
unfamiliar with it). That number of samples can grow very rapidly in an
environment of thousands of metered nodes and with a data retention of
several weeks. There is a few optimizations to make things smoother in
general cases fortunately, but as soon as you run specific queries, the API
gets barely usable.
During this last year, as the Ceilometer PTL, I discovered these issues
first hand since a lot of people were feeding me back with this kind of
testimony. We engaged several blueprints to improve the situation, but it
was soon clear to me that this was not going to be enough anyway.
Thinking outside the box
Unfortunately, the PTL job doesn't leave him enough time to work on the
actual code nor to play with anything new. I was coping with most of the
project bureaucracy and I wasn't able to work on any good solution to tackle
the issue at its root. Still, I had a few ideas that I wanted to try and as
soon as I stepped down from the PTL role, I stopped working on Ceilometer
itself to try something new and to think a bit outside the box.
When one takes a look at what have been brought recently in Ceilometer, they
can see the idea that Ceilometer actually needs to handle 2 types of data:
events and metrics.
Events are data generated when something happens: an instance start, a
volume is attached, or an HTTP request is sent to an REST API server. These
are events that Ceilometer needs to collect and store. Most OpenStack
components are able to send such events using the notification system built
into oslo.messaging.
Metrics is what Ceilometer needs to store but that is not necessarily tied
to an event. Think about an instance CPU usage, a router network bandwidth
usage, the number of images that Glance is storing for you, etc These are
not events, since nothing is happening. These are facts, states we need to
meter.
Computing statistics for billing or capacity planning requires both of these
data sources, but they should be distinct. Based on that assumption, and the
fact that Ceilometer was getting support for storing events, I started to
focus on getting the metric part right.
I had been a system administrator for a decade before jumping into OpenStack
development, so I know a thing or two on how monitoring is done in this
area, and what kind of technology operators rely on. I also know that
there's still no silver bullet this made it a good challenge.
The first thing that came to my mind was to use some kind of time-series
database, and export its access via a REST API as we do in all OpenStack
services. This should cover the metric storage pretty well.
Cooking Gnocchi
A cloud of gnocchis!
At the end of April 2014, this led met to start a new project code-named
Gnocchi. For the record, the name was picked after confusing so many times
the OpenStack Marconi project, reading OpenStack Macaroni instead. At least
one OpenStack project should have a "pasta" name, right?
The point of having a new project and not send patches on Ceilometer, was
that first I had no clue if it was going to make something that would be any
better, and second, being able to iterate more rapidly without being
strongly coupled with the release process.
The first prototype started around the following idea: what you want is to
meter things. That means storing a list of tuples of (timestamp, value) for
it. I've named these things "entities", as no assumption are made on what
they are. An entity can represent the temperature in a room or the CPU usage
of an instance. The service shouldn't care and should be agnostic in this
regard.
One feature that we discussed for several OpenStack summits in the
Ceilometer sessions, was the idea of doing aggregation. Meaning, aggregating
samples over a period of time to only store a smaller amount of them. These
are things that time-series format such as the
RRDtool have been doing for a long time on
the fly, and I decided it was a good trail to follow.
I assumed that this was going to be a requirement when storing metrics into
Gnocchi. The user would need to provide what kind of archiving it would
need: 1 second precision over a day, 1 hour precision over a year, or even
both.
The first driver written to achieve that and store those metrics inside
Gnocchi was based on whisper. Whisper
is the file format used to store metrics for the
Graphite project. For the actual storage,
the driver uses Swift, which has the advantages to be part of OpenStack and
scalable.
Storing metrics for each entities in a different whisper file and putting
them in Swift turned out to have a fantastic algorithm complexity: it was
O(1). Indeed, the complexity needed to store and retrieve metrics doesn't
depends on the number of metrics you have nor on the number of things you
are metering. Which is already a huge win compared to the current Ceilometer
collector design.
However, it turned out that whisper has a few limitations that I was
unable to circumvent in any manner. I needed to patch it to remove a lot of
its assumption about manipulating file, or that everything is relative to
now (time.time()). I've started to hack on that in my own fork, but then
everything broke. The whisper project code base is, well, not the state of
the art, and have 0 unit test. I was starring at a huge effort to transform
whisper into the time-series format I wanted, without being sure I wasn't
going to break everything (remember, no test coverage).
I decided to take a break and look into alternatives, and stumbled upon
Pandas, a data manipulation and statistics
library for Python. Turns out that Pandas support time-series natively, and
that it could do a lot of the smart computation needed in Gnocchi. I built a
new file format leveraging Pandas for computing the time-series and named it
carbonara (a wink to both the
Carbon project and pasta, how
clever!). The code is quite small (a third of whisper's, 200 SLOC vs 600
SLOC), does not have many of the whisper limitations and it has test
coverage. These Carbonara files are then, in the same fashion, stored into
Swift containers.
Anyway, Gnocchi storage driver system is designed in the same spirit that
the rest of OpenStack and Ceilometer storage driver system. It's a plug-in
system with an API, so anyone can write their own driver. Eoghan Glynn has
already started to write a InfluxDB driver, working
closely with the upstream developer of that database. Dina Belova started to
write an OpenTSDB driver. This helps to make sure
the API is designed directly in the right way.
Handling resources
Measuring individual entities is great and needed, but you also need to link
them with resources. When measuring the temperature and the number of a
people in a room, it is useful to link these 2 separate entities to a
resource, in that case the room, and give a name to these relations, so one
is able to identify what attribute of the resource is actually measured. It
is also important to provide the possibility to store attributes on these
resources, such as their owners, the time they started and ended their
existence, etc.
Relationship of entities and resources
Once this list of resource is collected, the next step is to list and filter
them, based on any criteria. One might want to retrieve the list of
resources created last week or the list of instances hosted on a particular
node right now.
Resources also need to be specialized. Some resources have attributes that
must be stored in order for filtering to be useful. Think about an instance
name or a router network.
All of these requirements led to to the design of what's called the
indexer. The indexer is responsible for indexing entities, resources, and
link them together. The initial implementation is based on
SQLAlchemy and should be pretty efficient. It's
easy enough to index the most requested attributes (columns), and they are
also correctly typed.
We plan to establish a model for all known OpenStack resources (instances,
volumes, networks, ) to store and index them into the Gnocchi indexer in
order to request them in an efficient way from one place. The generic
resource class can be used to handle generic resources that are not tied to
OpenStack. It'd be up to the users to store extra attributes.
Dropping the free form metadata we used to have in Ceilometer makes sure
that querying the indexer is going to be efficient and scalable.
The indexer classes and their relations
REST API
All of this is exported via a REST API that was partially designed and
documented in the
Gnocchi specification in the Ceilometer repository;
though the spec is not up-to-date yet. We plan to auto-generate the
documentation from the code as we are currently doing in Ceilometer.
The REST API is pretty easy to use, and you can use it to manipulate
entities and resources, and request the information back.
Macroscopic view of the Gnocchi architecture
Roadmap & Ceilometer integration
All of this plan has been exposed and discussed with the Ceilometer team
during the last
OpenStack summit in Atlanta
in May 2014, for the Juno release. I led a session about this entire
concept, and convinced the team that using Gnocchi for our metric storage
would be a good approach to solve the Ceilometer collector scalability
issue.
It was decided to conduct this project experiment in parallel of the current
Ceilometer collector for the time being, and see where that would lead the
project to.
Early benchmarks
Some engineers from Mirantis did a few benchmarks around Ceilometer and also
against an early version of Gnocchi, and Dina Belova presented them to us
during the mid-cycle sprint we organized in Paris in early July.
The following graph sums up pretty well the current Ceilometer performance
issue. The more you feed it with metrics, the more slow it becomes.
For Gnocchi, while the numbers themselves are not fantastic, what is
interesting is that all the graphs below show that the performances are
stable without correlation with the number of resources, entities or
measures. This proves that, indeed, most of the code is built around a
complexity of O(1), and not O(n) anymore.
Next steps
Cl ment drawing the logo
While the Juno cycle is being wrapped-up for most projects, including
Ceilometer, Gnocchi development is still ongoing. Fortunately, the composite
architecture of Ceilometer allows a lot of its features to be replaced by
some other code dynamically. That, for example, enables Gnocchi to provides
a Ceilometer dispatcher plugin for its collector, without having to ship the
actual code in Ceilometer itself. That should help the development of
Gnocchi to not be slowed down by the release process for now.
The Ceilometer team aims to provide Gnocchi as a sort of technology preview
with the Juno release, allowing it to be deployed along and plugged with
Ceilometer. We'll discuss how to integrate it in the project in a more
permanent and strong manner probably during the
OpenStack Summit for Kilo
that will take place next November in Paris.
Now that I've had my solar generation system for a little while, I thought I'd
write a follow up post on how it's all going.
Energex came out a week ago last Saturday and swapped my electricity meter over
for a new digital one that measures grid consumption and excess energy
exported. Prior to that point, it was quite fun to watch the old analog meter
going backwards. I took a few readings after the system was installed, through
to when the analog meter was disconnected, and the meter had a value 26 kWh
lower than when I started.
I've really liked how the excess energy generated during the day has
effectively masked any relatively small overnight power consumption.
Now that I have the new digital meter things are less exciting. It has a meter
measuring how much power I'm buying from the grid, and how much excess power
I'm exporting back to the grid. So far, I've bought 32 kWh and exported 53 kWh
excess energy. Ideally I want to minimise the excess because what I get paid
for it is about a third of what I have to pay to buy it from the grid. The
trick is to try and shift around my consumption as much as possible to the
daylight hours so that I'm using it rather than exporting it.
On a good day, it seems I'm generating about 10 kWh of energy.
I'm still impatiently waiting for PowerOne to release their WiFi
data logger card. Then I'm hoping I can set up something automated to
submit my daily production to PVOutput for added
geekery.
Update 2014-08-20: apcid needs tweaking. See update section below.
Somehow both my regular work laptop and home entertainment computers (both running Debian Jessie) were switched to systemd without me noticing. Judging from by dpkg.log it may have happened quite a while ago. I'm pretty sure that's a compliment to the backwards compatibility efforts made by the systemd developers and a criticism of me (I should be paying closer attention to what's happening on my own machines!).
In any event, I've started trying to pay more attention now - particularly learning how to take advantage of this new software. I'll try to keep this blog updated as I learn. For now, I have made a few changes and discoveries.
First - I have a convenient bash wrapper I use that both starts my OpenVPN client to a samba server and then mounts the drive. I only connect when I need to and rarely do I properly disconnect (the OpenVPN connection does not start automatically). So, I've written the script to carefully check if my openvpn connection is present and either restart or start depending on the results.
I had something like this:
if ps -eFH egrep [o]penvpn; then
sudo /etc/init.d/openvpn restart
else
sudo /etc/init.d/openvpn start
fi
One of the advertised advantages of systemd is the ability to more accurately detect if a service is running. So, first I changed this to:
if systemctl -q is-active openvpn.service; then
sudo systemctl restart openvpn.service
else
sudo systemctl start openvpn.service
fi
However, after reviewing the man page I realized I can shorten if further to simply:
sudo systemctl restart openvpn.service
According to the man page, restart means:
Restart one or more units specified on the command line. If the units are not
running yet, they will be started.
After discovering this meaning for "restart" in systemd, I tested and realized that "restart" works the same way for openvpn using the old sysv style init system. Oh well. At least there's a man page and a stronger guarantee that it will work with all services, not just the ones that happen to respect that convention in their init.d scripts.
The next step was to disable openvpn on start up. I confess, I never bothered to really learn update-rc.d. Everytime I read the manpage I ended up throwing up my hands and renaming symlinks by hand. In the case of openvpn I had previously edited /etc/default/openvpn to indicate that "none" of the virtual private networks should be started.
Now, I've returned that file to the default configuration and instead I ran:
systemctl disable openvpn.service
UPDATES
2014-08-20: I've recently noticed strange behavior when I wake my laptop. Seems to sometimes go right back to sleep. After doing some digging I traced the problem to some customizations I have made to my laptop's acpid behavior combined with systemd taking over some apci events.
Up to now, I have created my own /etc/acpi files so I have full control over the acpi events. In particular, I don't want my laptop to suspend when I close the lid. I only want it to suspend when I press the suspend key. And, when it does suspend, I want it to run my own personal suspend script so I can do things like lock the screen and restart tint2.
I've found that systemd launches it's own acpi event monitoring that ignores my /etc/acpid rules (the systemd "unit" that monitors events is called acpid.socket which exists in addition to acpid.service). The systemd reaction to events is controlled by the systemd-logind.service which has a configuration file: /etc/systemd/logind.conf. By default, systemd-logind.service will put my laptop to sleep when the lid is closed and when the suspend button is pushed. systemd seems to get the signal first, putting the laptop to sleep. After I wake it up, acpid gets the signal - so it goes right back to sleep.
Reading man logind.conf helps. I was able to restore my desired behavior by adding these lines to /etc/systemd/logind.conf:
With the release of the latestrtc.debian.org portal update, there are numerous improvements but there are still some known problems too.
The good news is that if you have a web browser, you can probably make successful WebRTC calls from one developer to another without any need to install or configure anything else.
The bad news is that not every permutation of browser and client will work. Here I list some of the limitations so people won't waste time on them.
The SIP proxy supports any SIP client
Just about any SIP client can connect to the proxy server and register. This does not mean that every client will be able to call each other. Generally speaking, modern WebRTC clients will be able to call each other. Standalone softphones or deskphones will call each other. Calling from a normal softphone or deskphone to a WebRTC browser, or vice-versa, will not work though.
Some softphones, like Jitsi, have implemented most of the protocols to communicate with WebRTC but they are yet to put the finishing touches on it.
Chat should just work for any combination of clients
The new WebRTC frontend supports SIP chat messaging.
There is no presence or buddy list support yet.
You can even use a tool like sipsak to accept or send SIP chats from a script.
Chat works for any client new or old. Although a WebRTC user can't call a softphone user, for example, they can send chats to each other.
WebRTC support in Iceweasel 24 on wheezy systems is very limited
On a wheezy system, the most recent Iceweasel update is version 24.7.
This version supports most of WebRTC but does not support TURN relay servers to help you out of a NAT network.
If you call between two wheezy machines on the same NAT network it will work. If the call has to traverse a NAT boundary it will not work.
Wheezy users need to either download a newer Firefox version or use Chromium.
JsSIP doesn't handle ICE elegantly
Internet Connectivity Establishment (ICE, RFC 5245) is meant to prevent calls from being answered with missing audio or video streams.
ICE is a mandatory part of WebRTC.
When correctly implemented, the JavaScript application will exchange ICE candidates and run the connectivity checks before alerting anybody that a call is ringing. If the checks fail (for example, with Iceweasel 24 and NAT), the caller should be told the call can't be made and the callee shouldn't be disturbed at all.
JsSIP is not operating in this manner though. It alerts the callee before telling the browser to start the connectivity checks. Then it even waits for the callee to answer. Only then does it tell the browser to start checking connectivity. This is not a fault with the ICE standard or the browser, it is an implementation problem.
Therefore, until this is fully fixed, people may still see some calls that appear to answer but don't have any media stream. After this is fixed, such calls really will be a thing of the past.
Debian RTC testing is more than just a pipe dream
Although these glitches are not ideal for end users, there is a clear roadmap to resolve them.
There are also a growing collection of workarounds to minimize the inconvenience. For example, JSCommunicator has a hack to detect when somebody is using Iceweasel 24 and just refuse to make the call. See the option require_relay_candidate in the config.js settings file. This also ensures that it will refuse to make a call if the TURN server is offline. Better to give the user a clear error than a call without any audio or video stream.
require_relay_candidate is enabled on freephonebox.net because it makes life easier for end users. It is not enabled on rtc.debian.org because some DDs may be willing to tolerate this issue when testing on a local LAN.
To find out more about practical integration of WebRTC into free software solutions, consider coming to my talk at xTupleCon in October.
Last time I changed my desktop computer I bought a CPU from the Intel Haswell family, the one available on the market at that time. I carefully selected the CPU to make sure it supports as many instructions extensions as possible in this family (Intel likes segmentation, even high-end CPUs like the Core i7-4770k do not support all possible instructions). I ended-up choosing the Core i7-4771 as it supports the Transactional Synchronization Extensions (Intel TSX) instructions, which provide transactional memory support. Support for it has been recently added in the GNU libc, and has been activated in Debian. By choosing this CPU, I wanted to be sure that I can debug this support in case of bug report, like for example in bug#751147.
Recently somecomputingwebsites started to mention that the TSX instructions have bugs on Xeon E3 v3 family (and likely on Core i7-4771 as they share the same silicon and stepping), quoting this Intel document. Indeed one can read on page 49:
HSW136. Software Using Intel TSX May Result in Unpredictable System Behavior
Problem: Under a complex set of internal timing conditions and system events, software using the Intel TSX (Transactional Synchronization Extensions) instructions may result in unpredictable system behavior.
Implication: This erratum may result in unpredictable system behavior.
Workaround: It is possible for the BIOS to contain a workaround for this erratum.
And later on page 51:
Due to Erratum HSw136, TSX instructions are disabled and are only supported for software development. See your Intel representative for details.
The same websites tell that Intel is going to disable the TSX instructions via a microcode update. I hope it won t be the case and that they are going to be able to find a microcode fix. Otherwise it would mean I will have to upgrade my desktop computer earlier than expected. It s a bit expensive to upgrade it every year and that s a the reason why I skipped the Ivy Bridge generation which didn t bring a lot from the instructions point of view. Alternatively I can also skip microcode and BIOS updates, in the hope I won t need another fix from them at some point.
I noticed a while ago a Perl script file included on my blog wasn t
served properly, since the charset wasn t announced and web browsers
didn t display it properly. The received file was still valid UTF-8
(hello, little character), at least!
First, wrong intuition
Reading Apache s /etc/apache2/conf.d/charset it looks like the
following directive might help:
AddDefaultCharset UTF-8
but comments there suggest reading the documentation! And indeed that alone
isn t sufficient since this would only affect text/plain and
text/html. The above directive would have to be combined with
something like this in /etc/apache2/mods-enabled/mime.conf:
AddType text/plain .pl
Real solution
To avoid any side effects on other file types, the easiest way forward
seems to avoid setting AddDefaultCharset and to associate the
UTF-8 charset with .pl files instead, keeping the text/x-perl
MIME type, with this single directive (again in
/etc/apache2/mods-enabled/mime.conf):
AddCharset UTF-8 .pl
Looking at response headers (wget -d) we re moving from:
Content-Type: text/x-perl
to:
Content-Type: text/x-perl; charset=utf-8
Conclusion
Nothing really interesting, or new. Just a small reminder that tweaking
options too hastily is sometimes a bad idea. In other news, another Perl
script is coming up soon. :)
Hi Everybody,
As you may know, part of my Google Summer of Code project involved the creation of merge tools for Elektra. The one I am going to focus on today is kdb merge. The kdb tool allows users to access and perform functions on the Elektra Key Database from the command line. We added a new command to this very useful tool, the merge command. This command allows a user to perform a three-way merge of KeySets from the kdb tool.
The command to use this tool is:
kdb merge [options] ourpath theirpath basepath resultpath
The standard naming scheme for a three-way merge consists of ours, theirs, and base:
ours refers to the local copy of a file
theirs refers to a remote copy
base refers to their common anscestor.
This works very similarly for KeySets, especially ones that consist of mounted conffiles.
For mounted conffiles:
ours should be the user s copy
theirs would be the maintainers copy
base would be the previous version of the maintainer s copy
If the user is just trying to accomplish is a three-way merge using any two arbitrary keysets that share a base,
it doesn t matter which ones are defined as ours or theirs as long as they use the correct base KeySet.
In kdb merge, ourpath, theirpath, and basepath work just like ours, theirs, and base except each one represents the
root of a KeySet. Resultpath is pretty self-explanatory, it is just where you want the result of the merge to be saved under.
It s worth noting, resultpath should be empty before attempting a merge, otherwise there can be unintended consquences.
As for the options, there are a few basic options:
-i --interactive which attempts the merge in an interactive way
-t --test which tests the proposed merge and informs you about possible conflicts
-f --force which overwrites any Keys in resultpath
Additionally there is an option to specify a merge strategy, which is very important.
The other option, strategy is:
s --strategy which is used to specify a strategy to use in case of a conflict
The current list of strategies are:
preserve the merge will fail if a conflict is detected
ours the merge will use our version during a conflict
theirs the merge will use their version during a conflict
base the merge will use the base version during a conflict
If no strategy is specified, the merge will default to the preserve strategy as to not risk making the wrong decision. If any of the other strategies are specified, when a conflict is detected, merge will use the Key specified by the strategy (ours, theirs, or base) for the resulting Key.
An example of using the kdb merge command:
kdb merge -s ours system/hosts/ours system/hosts/theirs system/hosts/base system/hosts/result
For more in depth examples, please see the full tutorial on our GitHub Documentation.
-Ian S. Donnelly
I m watching a Louis Theroux documentary about Autism (here s the link to the BBC web site [1]). The main thing that strikes me so far (after watching 7.5 minutes of it) is the bad design of the DLC-Warren school for Autistic kids in New Jersey [2].
A significant portion of people on the Autism Spectrum have problems with noisy environments, whether most Autistic people have problems with noise depends on what degree of discomfort is considered a problem. But I think it s reasonable to assume that the majority of kids on the Autism Spectrum will behave better in a quiet environment. So any environment that is noisy will cause more difficult behavior in most Autistic kids and the kids who don t have problems with the noise will have problems with the way the other kids act. Any environment that is more prone to noise pollution than is strictly necessary is hostile to most people on the Autism Spectrum and all groups of Autistic people.
The school that is featured in the start of the documentary is obviously wrong in this regard. For starters I haven t seen any carpet anywhere. Carpeted floors are slightly more expensive than lino but the cost isn t significant in terms of the cost of running a special school (such schools are expensive by private-school standards). But carpet makes a significant difference to ambient noise.
Most of the footage from that school included obvious echos even though they had an opportunity to film when there was the least disruption presumably noise pollution would be a lot worse when a class finished.
It s not difficult to install carpet in all indoor areas in a school. It s also not difficult to install rubber floors in all outdoor areas in a school (it seems that most schools are doing this already in play areas for safety reasons). For a small amount of money spent on installing and maintaining noise absorbing floor surfaces the school could achieve better educational results. The next step would be to install noise absorbing ceiling tiles and wallpaper, that might be a little more expensive to install but it would be cheap to maintain.
I think that the hallways in a school for Autistic kids should be as quiet as the lobby of a 5 star hotel. I don t believe that there is any technical difficulty in achieving that goal, making a school look as good as an expensive hotel would be expensive but giving it the same acoustic properties wouldn t be difficult or expensive.
How do people even manage to be so wrong about such things? Do they never seek any advice from any adult on the Autism Spectrum about how to run their school? Do they avoid doing any of the most basic Google searches for how to create a good environment for Autistic people? Do they just not care at all and create an environment that looks good to NTs? If they are just trying to impress NTs then why don t they have enough pride to care that people like me will know how bad they are? These aren t just rhetorical questions, I d like to know what s wrong with those people that makes them do their jobs in such an amazingly bad way.
GNOME has, for some reason or another,
always been the default desktop environment in Debian since the installer is
able to install a full desktop environment by default. Release after release,
Debian has been shipping different versions of GNOME, first based on the
venerable 1.2/1.4 series, then moving to the time-based GNOME 2.x series,
and finally to the newly designed 3.4 series for the last stable release,
Debian 7 wheezy .
During the final stages of wheezy s development, it was pointed out that
the first install CD image would not longer hold all of the required packages
to install a full GNOME desktop environment. There was lots of discussion
surrounding this bug or fact, and there were two major reactions to it. The
Debian GNOME team rebuilt some key packages so they would be compressed using
xz instead of gzip, saving the few megabytes that
were needed to squeeze everything in the first CD. In parallel, the tasksel
maintainer decided
switching to Xfce as default
desktop was another obvious fix. This change, unannounced and two days before
the freeze, was very contested and spurred the usual massive debian-devel
threads. In the end, and after a few default desktop flip flops, it was agreed
that GNOME would remain as the default for the already frozen wheezy release,
and this issue would be revisited later on during jessie s
development.
And indeed, some months ago, Xfce was again reinstated as Debian s
default desktop for jessie as announced:
Change default desktop to xfce.
This will be re-evaluated before jessie is frozen. The evaluation will
start around the point of DebConf (August 2014). If at that point gnome
looks like a better choice, it ll go back as the default.
Some criteria for that choice will include:
* Popcon numbers for gnome on jessie. If gnome installations continue to
rise fast enough despite xfce being the default (compared with, say
kde installations), then we ll know that users prefer gnome.
Currently we have no data about how many users would choose gnome when
it s not the default. Part of the reason for switching to xfce now
is to get such data.
* The state of accessability support, particularly for the blind.
* How well the UI works for both new and existing users. Gnome 3
seems to be adding back many gnome 2 features that existing users
expect, as well as making some available via addons. If it feels
comfortable to gnome 2 (and xfce) users, that would go a long way
toward switching back to it as the default. Meanwhile, Gnome 3 is also
breaking new ground in its interface; if the interface seems more
welcoming to new users, or works better on mobile devices, etc, that
would again point toward switching back.
* Whatever size constraints exist for CD or other images at the time.
--
Hello to all the tech journalists out there. This is pretty boring.
Why don t you write a story about monads instead?
Suffice to say that the Debian GNOME team participants have never been
thrilled about how the whole issue is being handled, and we ve been wondering
if we should be doing anything about it, or just move along and enjoy
the smaller amount of bug reports against GNOME packages that this change would
bring us, if it finally made it through to the final release. During our real
life meet-ups in FOSDEM and the systemd+GNOME sprint
in Antwerp, most members of the team did feel Debian would not be
delivering a graphical environment with the polish we think our users deserve,
and decided we at least should try to convince the rest of the Debian project
and our users that Debian will be best suited by shipping GNOME 3.12 by
default. Power users, of course, can and know how to get around this default
and install KDE, Xfce, Cinnamon, MATE or whatever other choice they have. For
the average user, though, we think we should be shipping GNOME by default, and
tasksel should revert the above commit again. Some of our reasons are:
Accessibility: GNOME continues to be the only free desktop
environment that provides full accessibility coverage, right from login screen.
While it s true GNOME 3.0 was lacking in many areas, and GNOME 3.4 (which we
shipped in wheezy) was just barely acceptable thanks to some last minute GDM
fixes, GNOME 3.12 should have ironed out all of the issues and our non-expert
understanding is that a11y support is now on par with what GNOME 2.30 from
squeeze offered.
Downstream health: The number of active members in the
team taking care of GNOME in Debian is around 5-10 persons, while it is 1-2 in
the case of Xfce. Being the default desktop draws a lot of attention (and bug
reports) that only a bigger team might have the resources to handle.
Upstream health: While GNOME is still committed to its
time-based release schedule and ships new versions every 6 months, Xfce
upstream is, unfortunately, struggling a bit more to keep up with new plumbing
technology. Only very recently it has regained support to suspend/hibernate via
logind, or support for Bluez 5.x, for example.
Community: GNOME is one of the biggest free software
projects, and is lucky to have created an ecosystem of developers, documenters,
translators and users that interact regularly in a live social community. Users
and developers gather in hackfests and big, annual conferences like
GUADEC, the
Boston Summit, or
GNOME.Asia. Only KDE has a comparable
community, the rest of the free desktop projects don t have the userbase or
humanpower to sustain communities like this.
Localization: Localization is more extensive and complete
in GNOME. Xfce has 18 languages above 95% of coverage, and 2 at 100%
(excluding English). GNOME has 28 languages above 95%, 9 of them being
complete (excluding English).
Documentation: Documentation coverage is extensive in
GNOME, with most of the core applications providing localized, up to date and
complete manuals, available in an accessible format via the Help reader.
Integration: The level of integration between components
is very high in GNOME. For example, instant messaging, agenda and accessibility
components are an integral part of the desktop. GNOME is closely integrated to
NetworkManager, PulseAudio, udisks and upower so that the user has access to
all the plumbing in a single place. GNOME also integrates easily with online
accounts and services (ownCloud, Google, MS Exchange ).
Hardware: GNOME 3.12 will be one of the few desktop
environments to support HiDPI displays, now very common on some laptop models.
Lack of support for HiDPI means non-technical users will get an unreadable
desktop by default, and no hints on how to fix that.
Security: GNOME is more secure. There are no processes
launched with root permissions on the user s session. All everyday operations
(package management, disk partitioning and formatting, date/time
configuration ) are accomplished through PolicyKit wrappers.
Privacy: One of the latest focuses of GNOME development is
improving privacy,
and work is being done to make it easy to run GNOME applications in isolated
containers, integrate Tor seamlessly in the desktop experience, better disk
encryption support and other features that should make GNOME a more secure
desktop environment for end users.
Popularity: One of the metrics discussed by the tasksel
change proponents mentioned popcon
numbers. 8 months after the desktop change,
Xfce does not seem to have made a dent on install numbers.
The Debian GNOME team doesn t feel popcon s data is any better than a
random online poll though, as it s an opt-in service which the vast majority
of users don t enable.
systemd embracing: One of the reasons to switch to Xfce
was that it didn t depend on systemd. But now that systemd is the default, that
shouldn t be a problem. Also given ConsoleKit is deprecated and dead upstream,
KDE and Xfce are switching or are planning to switch to systemd/logind.
Adaptation: Debian forced a big desktop change with the
wheezy release, switching from the traditional GNOME 2.x to the new GNOME Shell
environment. Switching again would mean more adaptation for uses when they ve
had two years to experience GNOME 3.4. Furthermore, GNOME 3.12 means two years
of improvements and polishing to GNOME 3.4, which should help with some of the
rough edges found in the GNOME release shipped with wheezy.
Administration: GNOME is easy to administrate. All the
default settings can be defined by administrators, and mandatory settings can
be forced to users, which is required in some companies and administrations;
Xfce cannot do that. The close integration with freedesktop components
(systemd, NM, PulseAudio ) also gives access to specific and useful
administration tools.
In short, we think defaulting to GNOME is the best option for the Debian
release, and in contrast, shipping Xfce as the default desktop could mean
delivering a desktop experience that has some incomplete or rough edges, and
not on par with Debian quality standards for a stable release. We believe
tasksel should again revert the change and be uploaded as soon as possible, in
order to get people testing images with GNOME the sooner the better, with the
freeze only two months away.
We would also like that in the future, changes of
this nature will not be announced in a git commit log, but widely discussed in
debian-project and the other usual development/decision channels, like the
change of init system happened recently. We will, whichever the final decision
is, continue to package GNOME with great care to ensure our users get the best
possible desktop experience Debian can offer.
I don't really like any of the ticketing systems I've ever needed to
use, whether they've been used as bug tracking systems, user support
issue management systems, or something else. Some are not too bad. I
currently rely most on debbugs and ikiwiki.
debbugs is the Debian bug tracking system. See
https://www.debian.org/Bugs/ for an entry point. It's mostly mail
based, with a read-only web interface. You report a bug by sending an
email to submission address, and (preferably) include a few magic
"pseudo-headers" at the top of your message body ot identify the
package and version. There's tools to make this easier, but mostly
it's just about sending an e-mail. All replies are via e-mails as
well. Effectively, each bug becomes is own little dedicated mailing
list.
This is important. A ticket, whether it is a bug report or a support
request, is all about the discussion. "Hey I have this problem..."
followed by "Have you tried..." and so forth. Anything that makes that
discussion easier and faster to have is better.
It is my very strong opinion, and long experience, that the best way
to have such a discussion is over e-mail. A lot of modern ticketing
systems are web based. They might have an e-mail mode, perhaps
read-only, but that's mostly an afterthought. It's a thing bolted onto
the side of the system because people like me whinge otherwise.
I like e-mail for this for several reasons.
E-mail is push, not pull. I don't need to go look at a web page to
be notified that something's happened.
E-mail requires no extra usernames and passwords to manage. I don't
need to create a new account every time I encounter a new ticketing
system instance.
E-mail makes it very easy to respond. I can just reply to a message.
I don't need to go to a web site, log in, and find a reply button.
I already have archives of my e-mail, so referring to old messages
(or finding them) is easy and quick. (Mutt, offlineimap, and notmuch
is my particular set of choices. But I'm not locked to them, and you
can use whatever you like, too.)
E-mail is a very rich format. Discussions are inherently threaded,
and various character sets, languages, attachments, and other such
things just work.
For these reasons, I strongly prefer ticketing systems in which
e-mails are the primary form of discussions, and e-mail is a first
class citizen. I don't mind if there's other ways to participate in
the discussion, but if I have to use something else than e-mail, I
tend not to be happy.
I use ikiwiki to provide a distributed, shared notebook on bugs. It's
a bit cumbersome, and doesn't work well for discussions.
I think we can improve on the way debbugs works, however. I've been
thinking about ticketing systems for Obnam (my backup program), since
it gaining enough users that it's getting hard to keep track of
discussions with just an e-mail client.
Here's what I want:
Obnam users do not need to care about there being a ticketing
system. They report a problem by e-mailing the support mailing list,
and they keep the list in cc when conducting the discussion. This
is very similar to debbugs, with the distinction that there's no
ticket numbers that must be kept in the replies.
The support staff (that's me, but hopefully others as well) have
access to the ticketing system, which automatically sorts incoming
messages into tickets. Tickets have sufficient metadata that it's
possible to track which ones have been dealt with, or still need
work, and perhaps other things. Each ticket contain a Maildir with
all the e-mails belonging to that ticket.
The ticketing system is distributed. I need to be able to work on
tickets offline, and to synchronise instances between different
computers. Just like git. It's not enough to have an offline mode
(e.g., queuing e-mails on my laptop for sending to debbugs when I'm
back online).
There is a reasonably powerful search engine that can quickly find
the relevant tickets, and messages, based on various criteria.
I will eventually have this. I'm not saying I'm working on this, since
I don't have enough free time to do that, but there's a git
repository, and some code, and it imports e-mails automatically now.
Some day there may even be a web interface.
(This has been a teaser.)
WordPress released today a security release 3.9.2 which they fix several security issues, including a denial of service issue around XML. The corresponding Debian package 3.9.2+dfsg-1 is currently being uploaded to the Debian ftp-master server as I write this and should be available on the mirrors soon.
Unfortunately at the time of writing, there are no CVE identifiers to match these problems up with, but refer to the wordpress page for details about these bugs.
Andrew Nacin from WordPress has kindly outlined what versions are susceptible and it looks like the Debian squeeze (3.6.1+dfsg-1~deb6u4) and wheezy (3.6.1+dfsg-1~deb7u3) are vulnerable to at least some of these bugs which means for me its patch reading and back-porting time
Since some time, those crappy Fritz!Box devices do not support WDS anymore, but rather a proprietary solution created by AVM. Now what happens if you have devices in another room that need/want wired access (like TVs, Playstations) or if you want to extend the range of your network? Buying another Fritz!Box is not very cost efficient What I did was to buy a cheap TP-Link TL-WR841N (can be bought for 18 euros) and installed OpenWRT on it. Here s how I configured it to act as a WiFi bridge.
Basic overview: You configure OpenWRT into station mode (that is, as a WiFi client) and use relayd to relay between the WiFi network and your local network. You also need igmpproxy to proxy multicast packages between those networks, other UPnP stuff won t work.
I did this on the recent Barrier Braker RC2. It should work on older versions as well, but I cannot promise it (I did not get igmpproxy to work in Attitude Adjustment, but that was probably my fault).
Note: I don t know if it works with IPv6, I only use IPv4.
You might want to re-start (or start) services after the steps, or reboot the router afterwards.
Configuring WiFi connection to the FRITZ!Box
Add to: /etc/config/network
config interface 'wwan'
option proto 'dhcp'
(you can use any other name you want instead of wwan, and a static IP. This will be your uplink to the Fritz!Box)
Replace wifi-iface in: /etc/config/wireless:
(adjust values as needed for your network)
Setting up the pseudo-bridge
First, add wwan to the list of networks in the lan zone in the firewall. Then add a forward rule for the lan network (not sure if needed). Afterwards, configure a new stabridge network and disable the built-in DHCP server.
Diff for /etc/config/firewall
@@ -10,2 +10,3 @@ config zone
list network 'lan'
+ list network 'wwan'
option input 'ACCEPT'
@@ -28,2 +29,7 @@ config forwarding
+# Not sure if actually needed
+config forwarding
+ option src 'lan'
+ option dest 'lan'
+
config rule
(Replace 192.168.178.26 with the IP address your OpenWRT router was given by the Fritz!Box on wlan0)
Also make sure to ignore dhcp on the lan interface, as the DHCP server of the FRITZ!Box will be used:
Diff for /etc/config/dhcp
Proxying multicast packages
For proxying multicast packages, we need to install igmpproxy and configure it:
Add to: /etc/config/firewall
# Configuration for igmpproxy
config rule
option src lan
option proto igmp
option target ACCEPT
config rule
option src lan
option proto udp
option dest lan
option target ACCEPT
(OpenWRT wiki gives a different 2nd rule now, but this is the one I currently use)
Replace /etc/config/igmpproxy with:
config igmpproxy
option quickleave 1
config phyint
option network wwan
option direction upstream
list altnet 192.168.178.0/24
config phyint
option network lan
option direction downstream
list altnet 192.168.178.0/24
(Assuming Fritz!Box uses the 192.168.178.0/24 network)
Don t forget to enable the igmpproxy script:
# /etc/init.d/igmpproxy enable
Optional: Repeat the WiFi signal
If you want to repeat your WiFi signal, all you need to do is add a second wifi-iface to your /etc/config/wireless.
Known Issues
If I was connected via WiFi to the OpenWRT AP and switch to the FRITZ!Box AP, I cannot connect to the OpenWRT router for some time.
The igmpproxy tool writes to the log about changing routes.
Future Work
I ll try to get the FRITZ!Box replaced by something that runs OpenWRT as well, and then use OpenWRT s WDS support for repeating; because the FRITZ!Box 7270v2 is largely crap loading a page in its web frontend takes 5 (idle) 20 seconds (1 download), and it s WiFi speed is limited to about 20 Mbit/s in WiFi-n mode (2.4 GHz (or 5 GHz, does not matter), 40 MHz channel). It seems the 7270 has a really slow CPU. Filed under: OpenWRT
[Warning: quite a bit of pics in this post]
[Edit: changed the post title, while I love the music, the actual lyrics
of "Shake Rattle and Roll" made me facepalm. Ronnie Dawson's song is
better :)]
Last weekend I've been in Senigallia for the 15th edition of Summer Jamboree.
It was my first time there, and it was epic. Really.
If you are into roots music and early rock'n'roll and/or into vintage 40s and 50s clothes, go there.
You won't regret it!
(You have time until August 10th, hurry up!)
If you follow my identi.ca account (whooo! shameless plug!), you may know that I love music in general and Blues, Jazz and Rockabilly in particular.
If you read my blog, you may know that I make clothes - particularly reproductions of 50s and retro clothes.
So, it's not much of a surprise that going to the Summer Jamboree has been a mindblowing experience to me.
What surprised me it's that I've felt the very same wonder of my first Debconf: the amazing feeling that you are not alone,
there are other people like you out there, who love the same things you love, who are silly about the same little details
(yes, I equally despise historically innacurate pin up shoes and non free software), who dance - metaphorically and not - at your same beat.
Same wonder I felt when I first read some authors - Orwell and David Foster Wallace, just to mention a couple - or when I first delved in
anarchist thinkers.
By nature I'm not much of a social person, and I tend to live and love alone. But that sense of being part of something, to find
like-minded people always blows me away.
I'm not much of a blog writer, so I won't probably be able to give you a good impression of the awesomness of it.
But hey, watch me trying.
The Vintage Market
I spent most of the morning travelling by train to reach Senigallia (and met the most beautiful French girl ever in the process, who sketched me in her notebook because, hey!, I was already in full Rockabilly gear).
The hotel was pretty close to the station, and to the part of the city where the festival was taking place, so I spent a couple of hours sleeping, then started the adventure.
The festival takes place mostly near the Rocca Roveresca, a beautiful fifteenth century castle, and on its gardens, but the all the other venues are in walking distance.
All around the Rocca there is a market with vintage clothes, records, shoes, retro jewelry.
A special mention for two fantastic dressmakers: Laura of Bloody Edith Atelier from Rome and Debora of The Black Pinafore from Sarzana. I bought just a piece from each of them, but I was able to do that only with a huge amount of self restraint.
Guitars! Tattoos!
Yes, I may have spent a bit drooling on the Gibson Cherry Red, and I tried (without amp, though) that beautiful orange Gretsch Electromatic.
And Greg Gregory of the Travel Ink Tattoo Studio from UK was there, with his shiny Airstream.
I also spent a while among the records in the Bear Family Records booth. They are a Germany based independent record label specialised in reissues of country and 50s rock'n'roll. Couldn't resist, and I bought a beautiful Sun Records' tshirt.
Just Rockin' and Rollin'. Aka: dance time
After that, it was time to dance. I missed the dance camp of the afternoon, but the DJ sets were fantastic, all 40s and 50s stuff, and I fell in love with Lindy Hop and Boogie Woogie, and well, obviously, Jive.
I could have spent hours watching the people dancing, and clumsily trying the most basic moves myself.
People
And the people, did I mention the people?
They were cosplaying the 40s and 50s so wonderfully I couldn't help but take some photos (and find a new fetish of mine: men in 40s clothes. Sexy as hell).
For instance, Angelo Di Liberto, artistic director of the festival with the beautiful burlesque artist Grace Hall.
Or the amazingly dressed German couple I met in via Carducci.
And this couple too, was pretty cool.
The Prettiest Smile award goes to these lovely ladies!
Cars
Who knows me, can tell that I don't love cars.
They stink, they are noisy, they are big.
But these ones where shiny and looked beautiful.
Also, the black Cadillac had the terrible effect on me of putting "Santa Claus is Back in Town" in my head (or, more precisely, Elvis tomcatting his way through the song, singing "Got no sleigh with reindeer / No sack on my back / You're gonna see me comin' in a big black Cadillac").
Music!
Sadly, I missed Stray Cat's Slim Jim Phantom but I was just in time for Ben E. King.
It was lovely: backed by the house band (The Good Fellas), he sang a lot of old Drifters hits, from On Broadway to Save the Last Dance for Me to - obviously - the great Stand By Me.
Then a bit of hillbilly country, with Shorty Tom and the Longshots, a French combo consisting of a double bass, a rhythm guitar and a steel guitar.
And, well, more dancing: the dj sets on the three stages went on until 3 am.
Day 2
The next morning I took advantage of the early opening of Rocca Roveresca to visit it. The Rocca itself is beautiful and very well maintained, and hosts various exhibitions.
"Marilyn In White" shows the incredible photos taken by George Barris on the set of "The Seven Year Itch" as well as some taken in 1962. Beautiful, really, especially the series on the beach.
But the ones moving me were the pics from "Buddy Holly, The Day The Music Dies": a collection of photos taken by Bill Francis during the (sadly brief) career of Buddy Holly from the very beginnings to his death.
After that, it was time to come back to year 2014, but really I felt like I've walked for a while in another decade and planet. And the cool thing is that I could enjoy the great 40s and 50s music and dances (and clothes!) without the horrible stereotypes and cultural norms of the time period. A total win. :)
So, ehm, that's it. I'm a bit sad to be back, and to cheer myself up I'm
already planning to attend Wanda Jackson gig in Aarburg (CH) next month.
And take Lindy Hop and Boogie lessons, obviously.
Oh man, I'm such a geek...
Being a single parent has required a considerable amount of self-discipline
on my behalf. I find I do best in an environment with routine to make sure
stuff gets done. One of the things I did to try and make sure stuff got done
was to form positive habits. To help and make this a bit more "fun", I
started using HabitRPG, an online
role-playing game based on habits.
I've only ever used it in a half-arsed manner, and as a result, I die a lot.
Often I'll do my dailies, but then forget to mark them off. Sometimes I just
fall off the habit wagon altogether. And die.
One of my dailies is to scoop my cat's litterboxes. For whatever reason, I
find this a tad onerous, and had found myself falling out of the habit of
doing it on a daily basis. My cat deserves better than this, so I wanted to
get back on the habit wagon, but make it a bit more "fun" as well.
I love NFC, I've
been a big NFC weenie for a long time. It's a solution looking for a
problem. I have a huge collection of NFC tags, and I've finally found a
problem I could use them with. I wanted to make it more frictionless to mark
a task as completed in HabitRPG. I didn't want to have to take out my phone,
unlock it, open the HabitRPG app and check off the daily task. I just wanted
to wave my phone at an NFC tag. Here's how I did it.
The inimitable Paul Fenwick, who first
inspired me to use HabitRPG, has a way more
complicated set up to achieve something similar. The Site Reliability
Engineer in me wanted the least number of moving parts and third-parties to
have to get from my phone to HabitRPG.
After some hunting around, I found this wiki
page on integrating Tasker
with HabitRPG's API, so based on that breadcrumb, I got hacking.
I'd not used Tasker before. I was already using AutomateIt
to do some other, reasonably dumb automation on my phone, though. Tasker is
a little bit obtuse, and it took me a couple of days of casual fiddling with
it to wrap my head around it's usage model. The fact that it can run
arbitrary JavaScript, and that NFC
Tools integrates with it is where the real awesome lies.
So based off the wiki, I crafted a couple of bits of JavaScript, one to mark
daily tasks as complete on HabitRPG, and one to query HabitRPG to see if
they have been marked as complete.
For the former, it was trivial, using NFC Tools, to write an NFC tag that
then runs the Tasker task to call the HabitRPG API to mark a daily task as
complete. That goal was now complete.
The equally satisfying part was also having Tasker do a time-based
conditional nag based on the state of the daily task in HabitRPG. So now if
it gets to 4:45pm and I haven't scooped the litterboxes, my phone literally
tells me I'd better go do it.
I've also done the same thing with putting the dishwasher on. I've stuck an
NFC tag on the dishwashing powder bottle lid, and I get a conditional
reminder before bed time. It used to be an unconditional reminder with
AutomateIt, and it was dumb, because I rarely forget to put the dishwasher
on. Now, I can use HabitRPG to keep state on it instead.
The hunk of JavaScript to update HabitRPG is very simple:
function mark_completed()
var http = new XMLHttpRequest();
http.open("POST", http_post_url, false);
http.setRequestHeader("x-api-user", global('HabitrpgUserid'));
http.setRequestHeader("x-api-key", global('HabitrpgApiToken'));
http.send();
return(http.responseText);
try
var result = mark_completed();
catch(e)
var error = e.message;
All of the interesting stuff is defined in variables preceding the JavaScript in the task definition. Here's a screenshot of the Task in Tasker that tells a thousand words:
Similarly, to query HabitRPG, I'm using:
function query_task()
var http = new XMLHttpRequest();
http.open("GET",http_get_url,false);
http.setRequestHeader("x-api-user", global('HabitrpgUserid'));
http.setRequestHeader("x-api-key", global('HabitrpgApiToken'));
http.send();
var p = JSON.parse(http.responseText);
return p['completed'];
try
var task_completed = query_task();
catch(e)
var error = e.message;
It's only slightly trickier because you have to parse the JSON blob that
comes back.
Again, a screenshot.
Now maybe I'll stop dying so much in HabitRPG, my cat will have the clean
toilet she deserves, and I'll stop getting reminded about putting the
dishwasher on when I already have. Better living through automation, that's
my motto.
It's 2027, and a company named Symbogen has revolutionized medicine and
health. They manufacture a genetically-engineered parasite based on a
tapeworm that can stabilize and protect the health of just about anyone.
It can synthesize medication, fix chronic medical problems, and be adapted
to different conditions. (Yes, I know biological systems don't work this
way. That's not going to be the only suspension of disbelief problem.)
This has made Symbogen one of the most powerful corporations in the
country, aided by the skill at marketing and self-promotion shown by one
of the founders.
Sal, the protagonist of the novel, is one of Symbogen's most famous
success stories. Sally was the victim of a horrible car crash that put
her into an apparently irreversible coma. But as her family was debating
whether to turn off life support, she woke up. She had no memory of her
previous life at all, and had to relearn fine motor control, reading, and
many other skills. She was essentially a new person. But she was alive;
her symbiont had saved her.
When the story proper starts, Sal is still a ward of her parents. She has
generally adult skills despite still struggling with reading, but she
still has occasional attacks and is under intensive monitoring by
Symbogen. That means periodic mandatory appointments with Symbogen, which
she hates, but she's otherwise started building a life for herself: a job
in an animal shelter, an interest in exotic predatory plants, and, most
notably, a boyfriend. There are things about her life she doesn't like,
and she wants to be free of Symbogen, but she doesn't have a bad life.
But then a mysterious illness begins sweeping through the population,
causing people to go blank, apparently lose their minds, and then start
attacking those near them.
Some of you have doubtless already figured out the key plot revelation.
It's not hard; even if you didn't from the summary, you will probably
figure it out shortly into the book. And therein lies a large problem
with this novel: it's hopelessly predictable. Creepy evil corporation
that supposedly has your best interests at heart, check. Plucky mad
scientist opposition who understands exactly what's going on, check.
Well-meaning but heavy-handed government agents who try to get involved
but mostly make everything worse, check. (Although it's unusual to have
those agents as part of the protagonist's family, and I thought that added
some additional depth.) Mostly clueless protagonist sucked into the plot
and becoming critical to its resolution, check. Very few readers are
going to be surprised by this story.
This is not, by itself, a fatal flaw. Predictable story structures can
carry satisfying variations, or introduce the reader to enjoyable
characters. And I think Grant manages both here.
Seanan McGuire, both as herself and under her Mira Grant pseudonym, tends
to write damaged and struggling characters. Both her
Newsflesh and October
Daye series feature protagonists that have been hurt badly, but are
coping and muddling through in their own ways. In Parasite, I
think she takes a more daring and intriguing approach: a protagonist that
other people in the story perceive as damaged and struggling, but who
actually isn't. Sal is not a badly injured Sally, and she's quite a bit
healthier than those around her think she is. Her thought processes don't
work quite the same as those around her, but that's not because she's
hurt. That's because she's a different person. This makes
Parasite partly a novel about identity, about Sal claiming
ownership of her own life. Grant drags this out longer than I wish she
had, but I liked the idea. In Sal, she strikes a good balance between
gratitude and genuine affection for her family and the need to become her
own person unconstrained by other people's expectations.
As with the Newsflesh series, Grant uses quotes and excerpts from
interviews to fill in the world background: a few at the start of each
chapter, and more around each part boundary. I like this technique, and
Grant uses it well. By the end of the book, the Rolling Stone
interview with the head of Symbogen has added a lot of insight into how
Symbogen manages its public relations.
Grant also throws in a few of her trademark dangerously off-beat
characters: hyper-competent, wise-cracking, but eerily skewed. I loved
those in Blackout and I loved Tansy and
Dr. Cale here. (Adam was much less successful.) A whole book from
Tansy's perspective wouldn't work, since she needs Sal as a straight
woman, but I thought she stole every scene she was in.
However, I agree wholeheartedly with Tansy on another point: Sal is
remarkably, irritatingly dim about what is apparently intended to be the
critical revelation of the book. I won't state it outright; given its
significant presence in the final scene, apparently it is intended to be a
spoiler. But I figured it out about 50 pages into the book. Grant
telegraphs this revelation heavily, and Tansy considers it painfully
obvious (with quite a bit of justification). But Sal doesn't figure it
out for the entire book, ignores all the signs, and is apparently
willfully blind. In a book written from the first-person perspective by
an otherwise-reliable narrator, this is highly annoying. It significantly
undermined my enjoyment of the book. I spent much of the novel ahead of
the narrator in my understanding of the plot and waiting, in vain, for her
to get on with it already.
That unfortunately makes Parasite a mixed bag. I really liked many
of the characters, and I think Grant did some interesting things with
family dynamics and with claiming one's own identity. But this is
undermined by a very predictable plot, the protagonist deciding to be
dumber than a sack of hammers about a critical plot point, and some rather
dubious world logic. (For example, why is Sal terrified of bad driving?
It makes sense as a post-traumatic stress reaction... except it's a
critical point to her characterization that she never went through
that stress.) Sometimes I wanted to like this book and sometimes I wanted
to shake it, and sometimes I felt both reactions at the same time.
I like Grant's writing and characterization well enough that I will
probably read the sequel, but this is more like the later books in the
Newsflesh series than it is like the spectacular Feed. Worth reading, at least for me, but it could have been
better.
Rating: 7 out of 10
I routinely use a Kinesis Advantage Pro keyboard, which is a split,
ergonomic keyboard with thumb clusters that uses brown cherryMX
switches. Over the thirteen years that I've been using it, I've become
a huge fan of this style of keyboard. However, I have two major
annoyances with the Kinesis. First, while the firmware is good,
remapping the keys is complicated and producing more complicated
keyboard layouts with layers and keycodes that are not present in the
original layout is not possible. Secondly, the interconnect between
the main key wells and the controller board in the middle occasionally
fails, and requires disassembly and occasional re-tinning of the
circuit board interconnect connector.
1
About a year ago, I became aware of the ErgoDox
keyboard, which is a keyboard design which mimics the kinesis to some
degree, but with completely separated key halves (useful, because I'm
substantially bigger than the average human), programmable firmware
(so I can finally have the layers and missing keys) and with slightly
more elegant interconnects (TRRS cables). Unfortunately, at the time I
first heard about it (and other custom keyboards), making it required
sourcing circuit boards, parts, and finding someone to cut a case for
the keyboard. Then, a few months ago, I learned about
MassDrop, a company who puts together
groups of people to do buys of products at near-wholesale level
prices, and their offer of all of the parts to
build an ErgoDox. After
waiting for a group buy of the keyboard to become available, I put in
an order, and received the parts two months later.
Over a few hours yesterday, I learned how to do surface mount
soldering of the 78 diodes (one for each key), and finished assembling
and flashing the firmware. This morning, I fixed up the few key
bindings that I needed to be productive, and viola, my laptop at home
now has a brand new ergonomic keyboard.
This is my monthly summary of my free software related activities. If you re among the people who made a donation to support my work (548.59 , thanks everybody!), then you can learn how I spent your money. Otherwise it s just an interesting status update on my various projects.
Distro Tracker
Now that tracker.debian.org is live, people reported bugs (on the new tracker.debian.org pseudo-package that I requested) faster than I could fix them. Still I spent many, many hours on this project, reviewing submitted patches (thanks to Christophe Siraut, Joseph Herlant, Dimitri John Ledkov, Vincent Bernat, James McCoy, Andrew Starr-Bochicchio who all submitted some patches!), fixing bugs, making sure the code works with Django 1.7, and started the same with Python 3.
I added a tox.ini so that I can easily run the test suite in all 4 supported environments (created by tox as virtualenv with the combinations of Django 1.6/1.7 and Python 2.7/3.4).
Over the month, the git repository has seen 73 commits, we fixed 16 bugs and other issues that were only reported over IRC in #debian-qa. With the help of Enrico Zini and Martin Zobel, we enabled the possibility to login via sso.debian.org (Debian s official SSO) so that Debian developers don t even have to explicitly create their account.
As usual more help is needed and I ll gladly answer your questions and review your patches.
Misc packaging work
Publican. I pushed a new upstream release of publican and dropped a useless build-dependency that was plagued by a difficult to fix RC bug (#749357 for the curious, I tried to investigate but it needs major work for make 4.x compatibility).
GNOME 3.12. With gnome-shell 3.12 hitting unstable, I had to update gnome-shell-timer (and filed an upstream ticket at the same time), a GNOME Shell extension to start some run-down counters.
Django 1.7. I packaged python-django 1.7 release candidate 1 in experimental (found a small bug, submitted a ticket with a patch that got quickly merged) and filed 85 bugs against all the reverse dependencies to ask their maintainers to test their package with Django 1.7 (that we want to upload before the freeze obviously). We identified a pain point in upgrade for packages using South and tried to discuss it with upstream, but after closer investigation, none of the packages are really affected. But the problem can hit administrators of non-packaged Django applications.
Misc stuff. I filed a few bugs (#754282 against git-import-orig uscan, #756319 against wnpp to see if someone would be willing to package loomio), reviewed an updated package for django-ratelimit in #755611, made a non-maintainer upload of mairix (without prior notice) to update the package to a new upstream release and bring it to modern packaging norms (Mako failed to make an upload in 4 years so I just went ahead and did what I would have done if it were mine).
Kali work resulting in Debian contributions
Kali wants to switch from being based on stable to being based on testing so I did try to setup britney to manage a new kali-rolling repository and encountered some problems that I reported to debian-release. Niels Thykier has been very helpful and even managed to improve britney thanks to the very specific problem that the kali setup triggered.
Since we use reprepro, I did write some Python wrapper to transform the HeidiResult file in a set of reprepro commands but at the same time I filed #756399 to request proper support of heidi files in reprepro. While analyzing britney s excuses file, I also noticed that the Kali mirrors contains many source packages that are useless because they only concern architectures that we don t host (and I filed #756523 against reprepro). While trying to build a live image of kali-rolling, I noticed that libdb5.1 and db5.1-util were still marked as priority standard when in fact Debian already switched to db5.3 and thus should only be optional (I filed #756623 against ftp.debian.org).
When doing some upgrade tests from kali (wheezy based) to kali-rolling (jessie based) I noticed some problems that were also affecting Debian Jessie. I filed #756629 against libfile-fcntllock-perl (with a patch), and also #756618 against texlive-base (missing Replaces header). I also pinged Colin Watson on #734946 because I got a spurious base-passwd prompt during upgrade (that was triggered because schroot copied my unstable s /etc/passwd file in the kali chroot and the package noticed a difference on the shell of all system users).
Thanks
See you next month for a new summary of my activities.
Yes, I've been bragging about the Operating Systems book all over... Today, a colleague handed me a phone call from somebody at Editorial Patria, a well known educational editorial in Mexico. They are looking for material similar to what I wrote, but need the material to be enfocado a competencias Focused on skills, a pedagogic fashion.
I was more than interested, of course. As it currently stands, I am very happy that our book is being used already at three universities in three countries (by the different authors) and have heard other people saying they would recommend it, and of course I'm interested in making our work have as big an impact as possible. Of course, we'd have to modify several aspects of the book to cater to the skills focus... But it would be great to have the book available at commercial bookstores. After all, university editions are never as widely circulated as commercial ones.
I had just one hard request to accept this: Our work must be distributed under a free licensing. Explicitly allow book photocopies and electronic distribution (didn't get into the "and modification" part, but I would eventually get there ;-) )
And... Of course, the negotiation immediately fell down. Editorials, this person says, live from selling individual books. She says she was turned down by another university professor and for another subject this same week.
So, yes, I took the opportunity to explain things as I (and the people that think as I do Fortunately, not so few) see them. Yes, of course, editorials have to make a living. But text books are often photocopied as it is. Who buys a book? Whoever needs it. On one hand, if somebody will be using a book throughout a semester and it's reasonably priced (say, up to 3 cost of photocopies), they will probably buy it because it just works better (it is more comfortable to use and nicer to read).
If a teacher likes the explanation for a particular topic, it should be completely legal for him to distribute photocopies (or digital copies) of the specific material And quite probably, among the students, more than one will end up appreciating the material enough to go look for the book in the library. And, as I have done throughout my life, if I read (in copies, electronically or in a library) a book I like... Quite probably I will go buy it.
So... Of course, she insisted it was against their corporate policy. I insisted on my explanation. I hope they meet many stubborn teachers refusing to distribute books under a non-free licensing. I hope I contributed to making a dent in an industry that must change. Yes, a very very small dent, but one that helps them break free from their obsolete mindset ;-)
(But yes, I don't know how long I will regret not being part of their very nice catalog of science and engineering books) ;-) )
I wrote a BTRFS status report yesterday commenting on the uneventful use of BTRFS recently [1].
Early this morning the server that stores my email (which had 93 days uptime) had a filesystem related problem. The root filesystem became read-only and then the kernel message log filled with unrelated messages so there was no record of the problem. I m now considering setting up rsyslogd to log the kernel messages to a tmpfs filesystem to cover such problems in future. As RAM is so cheap it wouldn t matter if a few megs of RAM were wasted by that in normal operation if it allowed me to extract useful data when something goes really wrong. It s really annoying to have a system in a state where I can login as root but not find out what went wrong.
After that I tried 2 kernels in the 3.14 series, both of which had kernel BUG assertions related to Xen networking and failed to network correctly, I filed Debian Bug #756714. Fortunately they at least had enough uptime for me to run a filesystem scrub which reported no errors.
Then I reverted to kernel 3.13.10 but the reboot to apply that kernel change failed. Systemd was unable to umount the root filesystem (maybe because of a problem with Xen) and then hung the system instead of rebooting, I filed Debian Bug #756725. I believe that if asked to reboot a system there is no benefit in hanging the system with no user space processes accessible. Here are some useful things that systemd could have done:
Just reboot without umounting (like reboot -nf does).
Pause for some reasonable amount of time to give the sysadmin a possibility of seeing the error and then rebooting.
Go back to a regular runlevel, starting daemons like sshd.
Offer a login prompt to allow the sysadmin to login as root and diagnose the problem.
Options 1, 2, and 3 would have saved me a bit of driving. Option 4 would have allowed me to at least diagnose the problem (which might be worth the drive).
Having a system on the other side of the city which has no remote console access just hang after a reboot command is not useful, it would be near the top of the list of things I don t want to happen in that situation. The best thing I can say about systemd s operation in this regard is that it didn t make the server catch fire.
Now all I really know is that 3.14 kernels won t work for my server, 3.13 will cause problems that no-one can diagnose due to lack of data, and I m now going to wait for it to fail again. As an aside the server has ECC RAM and it s hardware is known to be good, so I m sure that BTRFS is at fault.