[systemd-devel] How to reset startlimitburst and startlimitinterval
Hi Could you please let me know to reset startlimitburst and startlimitinterval of service. I am writing unit tests and each test should start fresh and run test on service .so values of startlimitburst and startlimitinterval of previous test should be reset before running each test . Thanks for help ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Issues discovered with systemd_vconsole_setup helper
1) font_copy_to_all_vcs(): copying fonts of height different from "standard" 16 produces garbage on all other terminals (with exception of builtin basic vga). The workaround is to call setfont directly providing another terminal with -C option (or log in and type the command blindly), e.g. setfont -C /dev/tty2 latarcyrheb-sun32 The issue is (probably) following line: cfo.height = vcs.v_active-1; /* tty1 == index 0 */ as terminal index is not its height (in near all cases the height value will be 0 as vconsole helper operates on tty1 - so copying works fine as long as the actual height doesn't change, again probably). It probably needs KD_FONT_OP_GET or maybe GIO_FONTX. Initial tests I did so far though failed miserably (I always get 0 from those calls). Wouldn't it be better (or at least safer) to just call setfont for each iterated terminal ? 2) PIO/GIO_UNISCRNMAP & PIO/GIO_SCRNMAP Or ITOW - setfont -m / FONT_MAP. a) These are not necessary during copying, as the mapping is global - once it's set at any terminal, it becomes the new default for all consoles (regardless of their modes). b) There's nasty issue here as well - if PIO_SCRNMAP is called (unnecessarily it seems) before PIO_UNISCRNMAP, it will invalidate all mappings beyond 255 (including source console, as the setting is global). This usually leads to terminals with non-working tab, backspace, etc. The workaround is to log in and use setfont with -m option. I discovered this bug due to another bug in kdb: https://lists.altlinux.org/pipermail/kbd/2016-June/000591.html as currently to have polish letters, setfont's -m/vconsole's FONT_MAP (normally needed only in non-utf8 modes) have to be provided as well in utf8 mode (or - alternatively - kdb downgraded to 1.15.5 for correctly working loadkeys -u). The fix here is simple - remove [UNI]SCRNMAP invocations. I can provide patches, though what would be the best approach to the first issue (just call setfont per terminal) ? Also, vconsole helper iterates over 15 terminals always (hardcoded), maybe it would be more flexible to provide a setting for it (or lower it to 12) ? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Zero downtime restart of Web application (Nginx, Puma, JRuby)
Dear systemd folks, the setup is as follows. Nginx is used as the Web server, which communicates with a Ruby on Rails application over a socket. Puma [1] is used as the application server. Nginx and Puma are managed by systemd service files. If a new version of the application is installed, the goal is that there is no downtime. That means, until the application with the new code isn’t ready yet to serve requests, the old application still answers them, that means, not only are no requests lost, but during restart the visitor does not need to wait any longer than normally. In this case, JRuby is used, which means that application start, `sudo systemctl start web-application.service` takes more than 30 seconds. So, `sudo systemctl restart web-application.service` is not enough as Puma takes some time to be started. (The socket activation described in the Puma systemd documentation [2] only takes care, that no requests are lost. The visitor still has to wait.) Is that possible by just using systemd, or is a load balancer like HAProxy or a special NGINX configuration and service file templates needed? My current thinking would be, that a service file template for the Puma application server is used. The new code is then started in parallel, and if it’s done, it “takes over the socket”. (No idea if NGINX would need to be restarted.) Then the old version of the code is stopped. (I don’t know how to model that last step/dependency.) What drawbacks does the above method have? Is it implementable? How do you manage such a setup? Thanks, Paul [1] http://puma.io/ [2] https://github.com/puma/puma/blob/master/docs/systemd.md signature.asc Description: This is a digitally signed message part ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel