Profile cover photo
Profile photo
Reini Urban
703 followers -
cPanel
cPanel

703 followers
About
Reini's interests
View all
Reini's posts

Post has attachment
List of predicted Cannes movies 2016

Post has attachment
Comic Con Leipzig
Photo

Post has attachment
My little pony
Photo

Post has attachment
Treffende Kritik

Post has attachment

Post has attachment
Discussion of the new cperl type system (in work)

Benefits and throwbacks

Post has shared content
Adventures with systemd

I have just had my first real production interaction with systemd. I should warn partisans in advance that the conclusion is not clearly pro- or anti-systemd, the upshot is, there's a surprise interaction, and the means to manage it. Also the Debian community is awesome.

My issue was, for several systems, mostly VMs and cluster nodes in a test cluster that I'm setting up, the default config on Debian Jessie upgraded from Wheezy, SSH sessions do not cleanly exit when the system reboots. This is bad because my cluster-management tools, which push commands out to all the systems via ssh, will fail to exit or generate error codes which are false positives in this circumstance. Rebooting is rare, but important.

There's a Debian bug thread about this, linked below, and there are two solutions, both of which work, and I have used each in different circumstances.
   
The first solution is to enable "UsePAM" in your sshd config. Apparently, with UsePAM turned on and libpam-systemd installed, SSH sessions get registered in some global set of connections, and can be found and cleaned up at shut-down time. To my mind, this is a pretty strange interaction, and represents the kind new, poorly-managed global state that we were all freaking out about when we first learned about systemd. I have implemented this solution on the head node of the cluster in question, and it works.
  
For the client nodes of the cluster, I didn't really like this solution, it has the bad side effect of making all SSH connections display the message of the day and other status info (last log-in, etc.) that comes from working the PAM mechanism. Because client nodes do daemon-driven MPI connections, it's important that these connections be clean, there should be no status messages or other system traffic, once the SSH handshake is finished, it should go straight to the MPI traffic, otherwise MPI can get confused and behave poorly. One can in principle edit the PAM config to eliminate the superfluous messages, but you might still want them for console log-ins, and even so, you can still do it, just have the pam-ssh files not use any of the common-auth or common-session stuff, but then there's a lot of near-redundancy, it feels like the wrong scope.

Fortunately, there's the second solution -- if you disable "ssh.service" and enable "ssh.socket", you get clean session termination without requiring PAM in the sshd_config. This is what I have done on the client nodes of my cluster.

So, as I say, my first real operational issue connected with systemd, and so far so good.

Post has shared content
Just wanted to share something cool. The music service I'm working with to port their Node to Dart, are LOVING Dart so much.

At first they thought it was going to take them a long time to port their code because it is a new language for them, but it's been a few weeks and most of it ported.

They loved it so much, that we're now working on porting their front-end music player from JS to Dart.

Thanks Dart Team! You guys are doing an amazing job.

Once the product is ready to launch, i'll share it here!

Argh, today I had to write a op_clone tree copier from scratch for my inliner. Copying graphs is not trivial, with pointers pointing inside and outside. In #perl5 we only had functions to clone data, but not code. op_clone keeps the data, but the inlined function needs to change some ops. esp. nextstate and args: by ref and if by value with a copy of the data.
My old attempt was fast, but destructively modified each inlined function in the definition.
  
More memory (max 10 copied ops per inlined cv), but more speed. No costly arg handling, no costly call and leave handling. Using the stack naturally and not as hackish and expensive as currently. Supporting fast call-by-ref, constants and literals and call-by-value, everything compile-time.
Now the loop-unroller will also be trivial.

BTW: nextstate is horror. It ends a statement, every ';',
and it resets the SP, the stack pointer, for each new line. A normal compiler would keep track of the stack context and would not pollute the stack with unconsumed data. lhs expr should not push their results to the stack, unless it's the end of a function.
For my inliner I added 2 new state ops, to keep the SP inside inlined functions, setstate and keepstate. Horrible, but so far an easier hack than rewriting the compiler to honor the lhs context properly.
Wait while more posts are being loaded