<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>linuxmonk.ch</title>
    <link>https://blog.linuxmonk.ch/</link>
    <description>In search of technological enlightenment</description>
    <language>en</language>
    <lastBuildDate>Mon, 24 Feb 2020 02:02:34 +0100</lastBuildDate>
    <atom:link href="https://blog.linuxmonk.ch/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Testing oVirt 4.4-alpha on CentOS 8: Part 2 - Setup Self-Hosted Engine</title>
      <link>https://blog.linuxmonk.ch/2020/testing-ovirt-4-4-alpha-on-centos-8-part-2-setup-self-hosted-engine/</link>
      <pubDate>Mon, 24 Feb 2020 02:02:34 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2020/testing-ovirt-4-4-alpha-on-centos-8-part-2-setup-self-hosted-engine/</guid>
      <description>&lt;p&gt;This is the second part of my field report about installing the oVirt 4.4-alpha release on CentOS 8 in a &lt;a href=&#34;https://www.ovirt.org/documentation/gluster-hyperconverged/Gluster_Hyperconverged_Guide.html&#34;&gt;hyperconverged&lt;/a&gt; setup. In the &lt;a href=&#34;https://blog.linuxmonk.ch/2020/testing-ovirt-4-4-alpha-on-centos-8-part-1-setup-glusterfs/&#34;&gt;first part&lt;/a&gt; I was focusing on setting up the GlusterFS storage cluster and now I&amp;rsquo;m going to describe my experience of the self-hosted engine installation.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;If you think about repeating this installation on your hardware please let me remind you: &lt;strong&gt;This software is currently in alpha status.&lt;/strong&gt; This means there are likely still many bugs and rough edges and if you succeed to install it successfully there is no guarantee for updates not breaking everything again. Please don&amp;rsquo;t try this anywhere close to production systems or data. I won&amp;rsquo;t be able to assist you in any way if things turn out badly.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;cockpit-hosted-engine-wizard&#34;&gt;Cockpit Hosted-Engine Wizard&lt;/h2&gt;&#xA;&lt;p&gt;Before we can start installing the self-hosted engine, we need to install a few more packages:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# dnf install ovirt-engine-appliance vdsm-gluster&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Similar to the GlusterFS setup, also the hosted engine setup can be done from the &lt;a href=&#34;https://cockpit-project.org/&#34;&gt;Cockpit&lt;/a&gt; Web interface:&#xA;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/ovirt-cockpit-integration.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/ovirt-cockpit-integration.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The wizard is also here pretty self-explanatory. There are a few options missing in Web-UI compared to the commandline installer ( &lt;code&gt;hosted-engine --deploy&lt;/code&gt;) e.g. you cannot customize the name of the libvirt domain which is called &amp;lsquo;HostedEngine&amp;rsquo; by default. You must give the common details such as hostname, VM resources, some network settings, credentials for the VM and oVirt and that&amp;rsquo;s pretty much it:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-he-settings.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-he-settings.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-he-settings-2.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-he-settings-2.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Before you start deploying the VM there is also a quick summary of the settings and then an answer file will be generated. While the GlusterFS setup created a regular Ansible inventory the hosted engine setup has its own INI-format. It&amp;rsquo;s a useful feature that even when the deployment aborts, it can always be restarted from the Web interface without the need to fill in the form again and again. Indeed, I used this to my advantage a lot because it took me at least 20 attempts before the hosted engine VM was setup successfully.&lt;/p&gt;&#xA;&lt;h2 id=&#34;troubleshooting-hosted-engine-issues&#34;&gt;Troubleshooting hosted-engine issues&lt;/h2&gt;&#xA;&lt;p&gt;Once VM deployment was running I found that the status output in the Cockpit Web interface heavily resembled Ansible output. It seems that a big part of the deployment code in the &lt;code&gt;hosted-engine&lt;/code&gt; tool was re-implemented now using the &lt;a href=&#34;https://github.com/oVirt/ovirt-ansible-hosted-engine-setup&#34;&gt;ovirt-ansible-hosted-engine-setup&lt;/a&gt; Ansible roles in the background. If you&amp;rsquo;re familiar with Ansible this definitely simplifies troubleshooting and also allows a better understanding what is going on. Unfortunately there is still a layer of &lt;code&gt;hosted-engine&lt;/code&gt; code above Ansible so that I couldn&amp;rsquo;t figure out, if it&amp;rsquo;s possible to run a playbook from the shell that would do the same setup.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-he-messages.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-he-messages.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Obviously it didn&amp;rsquo;t take long for an issue to pop-up:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The first error was that Ansible couldn&amp;rsquo;t connect to the hosted-engine VM that was freshly created from the oVirt appliance disk image. The error output in the Web interface is rather limited but also here a log file exists that can be found at a path like &lt;code&gt;/var/log/ovirt-engine/setup/ovirt-engine-setup-20200218154608-rtt3b7.log&lt;/code&gt;. In the log file I found:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;2020-02-18 15:32:45,938+0100 DEBUG ansible on_any args localhostTASK: ovirt.hosted_engine_setup : Wait for the local VM kwargs&#xA;2020-02-18 15:35:52,816+0100 ERROR ansible failed {&#xA;    &amp;#34;ansible_host&amp;#34;: &amp;#34;localhost&amp;#34;,&#xA;    &amp;#34;ansible_playbook&amp;#34;: &amp;#34;/usr/share/ovirt-hosted-engine-setup/ansible/trigger_role.yml&amp;#34;,&#xA;    &amp;#34;ansible_result&amp;#34;: {&#xA;        &amp;#34;_ansible_delegated_vars&amp;#34;: {&#xA;            &amp;#34;ansible_host&amp;#34;: &amp;#34;ovirt.oasis.home&amp;#34;&#xA;        },&#xA;        &amp;#34;_ansible_no_log&amp;#34;: false,&#xA;        &amp;#34;changed&amp;#34;: false,&#xA;        &amp;#34;elapsed&amp;#34;: 185,&#xA;        &amp;#34;msg&amp;#34;: &amp;#34;timed out waiting for ping module test success: Using a SSH password instead of a key is not possible because Host Key checking is enabled and sshpass does not support this.  Please add this host&amp;#39;s fingerprint to your know&#xA;n_hosts file to manage this host.&amp;#34;&#xA;    },&#xA;    &amp;#34;ansible_task&amp;#34;: &amp;#34;Wait for the local VM&amp;#34;,&#xA;    &amp;#34;ansible_type&amp;#34;: &amp;#34;task&amp;#34;,&#xA;    &amp;#34;status&amp;#34;: &amp;#34;FAILED&amp;#34;,&#xA;    &amp;#34;task_duration&amp;#34;: 187&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;A manual SSH login with the root account on the VM was possible after accepting the fingerprint. Maybe this is still a bug or I missed a setting somewhere, but the easiest way to solve this was to create a &lt;code&gt;~root/.ssh/config&lt;/code&gt; file on the hypervisor host with the following content. The hostname is the hosted-engine FQDN:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Host ovirt.oasis.home&#xA;    StrictHostKeyChecking accept-new&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Each installation attempt will make sure that the previous host key is deleted from the &lt;code&gt;known_hosts&lt;/code&gt; file so no need to worry about changing keys on multiple installation tries. The deployment could simply be restarted by pressing the &amp;ldquo;Prepare VM&amp;rdquo; button once again.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;During the next run the connection to the hosted-engine VM succeeded and it nearly completed all of the setup task within the VM but then failed when trying to restart the &lt;code&gt;ovirt-engine-dwhd&lt;/code&gt; service:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;2020-02-18 15:48:45,963+0100 INFO otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.core.service service._closeup:52 Starting dwh service&#xA;2020-02-18 15:48:45,964+0100 DEBUG otopi.plugins.otopi.services.systemd systemd.state:170 starting service ovirt-engine-dwhd&#xA;2020-02-18 15:48:45,965+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:813 execute: (&amp;#39;/usr/bin/systemctl&amp;#39;, &amp;#39;start&amp;#39;, &amp;#39;ovirt-engine-dwhd.service&amp;#39;), executable=&amp;#39;None&amp;#39;, cwd=&amp;#39;None&amp;#39;, env=None&#xA;2020-02-18 15:48:46,005+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.executeRaw:863 execute-result: (&amp;#39;/usr/bin/systemctl&amp;#39;, &amp;#39;start&amp;#39;, &amp;#39;ovirt-engine-dwhd.service&amp;#39;), rc=1&#xA;2020-02-18 15:48:46,006+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:921 execute-output: (&amp;#39;/usr/bin/systemctl&amp;#39;, &amp;#39;start&amp;#39;, &amp;#39;ovirt-engine-dwhd.service&amp;#39;) stdout:&#xA;&#xA;2020-02-18 15:48:46,006+0100 DEBUG otopi.plugins.otopi.services.systemd plugin.execute:926 execute-output: (&amp;#39;/usr/bin/systemctl&amp;#39;, &amp;#39;start&amp;#39;, &amp;#39;ovirt-engine-dwhd.service&amp;#39;) stderr:&#xA;Job for ovirt-engine-dwhd.service failed because the control process exited with error code. See &amp;#34;systemctl status ovirt-engine-dwhd.service&amp;#34; and &amp;#34;journalctl -xe&amp;#34; for details.&#xA;&#xA;2020-02-18 15:48:46,007+0100 DEBUG otopi.context context._executeMethod:145 method exception&#xA;Traceback (most recent call last):&#xA;  File &amp;#34;/usr/lib/python2.7/site-packages/otopi/context.py&amp;#34;, line 132, in _executeMethod&#xA;    method[&amp;#39;method&amp;#39;]()&#xA;  File &amp;#34;/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine-dwh/core/service.py&amp;#34;, line 55, in _closeup&#xA;    state=True,&#xA;  File &amp;#34;/usr/share/otopi/plugins/otopi/services/systemd.py&amp;#34;, line 181, in state&#xA;    service=name,&#xA;RuntimeError: Failed to start service &amp;#39;ovirt-engine-dwhd&amp;#39;&#xA;2020-02-18 15:48:46,008+0100 ERROR otopi.context context._executeMethod:154 Failed to execute stage &amp;#39;Closing up&amp;#39;: Failed to start service &amp;#39;ovirt-engine-dwhd&amp;#39;&#xA;2020-02-18 15:48:46,009+0100 DEBUG otopi.context context.dumpEnvironment:765 ENVIRONMENT DUMP - BEGIN&#xA;2020-02-18 15:48:46,010+0100 DEBUG otopi.context context.dumpEnvironment:775 ENV BASE/error=bool:&amp;#39;True&amp;#39;&#xA;2020-02-18 15:48:46,010+0100 DEBUG otopi.context context.dumpEnvironment:775 ENV BASE/exceptionInfo=list:&amp;#39;[(, RuntimeError(&amp;#34;Failed to start service &amp;#39;ovirt-engine-dwhd&amp;#39;&amp;#34;,), )]&amp;#39;&#xA;2020-02-18 15:48:46,012+0100 DEBUG otopi.context context.dumpEnvironment:779 ENVIRONMENT DUMP - END&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Fortunately I was able to login to the hosted-engine VM and found the following blunt error:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;-- Unit ovirt-engine-dwhd.service has begun starting up.&#xA;Feb 18 15:48:46 ovirt.oasis.home systemd[30553]: Failed at step EXEC spawning /usr/share/ovirt-engine-dwh/services/ovirt-engine-dwhd/ovirt-engine-dwhd.py: Permission denied&#xA;-- Subject: Process /usr/share/ovirt-engine-dwh/services/ovirt-engine-dwhd/ovirt-engine-dwhd.py could not be executed&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Indeed, the referenced script was not marked executable. Fixing it manually and restarting the service showed that this would succeed. But there is one problem. This change is not persisted. On the next deployment run, the hosted-engine VM will be deleted and re-created again. When searching for a nicer solution I found that this bug is actually already fixed in the latest release of &lt;code&gt;ovirt-engine-dwh-4.4.0-1.el8.noarch.rpm&lt;/code&gt; but the appliance image ( &lt;code&gt;ovirt-engine-appliance-4.4-20200212182535.1.el8.x86_64&lt;/code&gt;) was only including &lt;code&gt;ovirt-engine-dwh-4.4.0-0.0.master.20200206083940.el7.noarch&lt;/code&gt; and there is no newer appliance image. That&amp;rsquo;s part of the experience when trying alpha releases but it&amp;rsquo;s not a blocker. Eventually I found that there is a directory where you can place an Ansible tasks file which will be executed in the hosted-engine VM before the setup is run. So I created the file &lt;code&gt;hooks/enginevm_before_engine_setup/yum_update.yml&lt;/code&gt; in the &lt;code&gt;/usr/share/ansible/roles/ovirt.hosted_engine_setup/&lt;/code&gt; directory with the following content:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;  ---&#xA;- name: Update all packages&#xA;  package:&#xA;  name: &amp;#39;*&amp;#39;&#xA;  state: latest&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;From then on each deployment attempt was first updating the packages including &amp;lsquo;ovirt-engine-dwh&amp;rsquo; in the VM before the &lt;code&gt;hosted-engine&lt;/code&gt; would continue to configure and restart the service.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The next issue was suddenly appearing when I tried to re-run the deployment. The Ansible code would fail early with an error that it cannot update the routing rules on the hypervisor:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;2020-02-18 16:17:38,330+0100 DEBUG ansible on_any args  kwargs&#xA;2020-02-18 16:17:38,664+0100 INFO ansible task start {&amp;#39;status&amp;#39;: &amp;#39;OK&amp;#39;, &amp;#39;ansible_type&amp;#39;: &amp;#39;task&amp;#39;, &amp;#39;ansible_playbook&amp;#39;: &amp;#39;/usr/share/ovirt-hosted-engine-setup/ansible/trigger_role.yml&amp;#39;, &amp;#39;ansible_task&amp;#39;: &amp;#39;ovirt.hosted_engine_setup : Add IPv4 outbo&#xA;und route rules&amp;#39;}&#xA;2020-02-18 16:17:38,664+0100 DEBUG ansible on_any args TASK: ovirt.hosted_engine_setup : Add IPv4 outbound route rules kwargs is_conditional:False&#xA;2020-02-18 16:17:38,665+0100 DEBUG ansible on_any args localhostTASK: ovirt.hosted_engine_setup : Add IPv4 outbound route rules kwargs&#xA;2020-02-18 16:17:39,214+0100 DEBUG var changed: host &amp;#34;localhost&amp;#34; var &amp;#34;result&amp;#34; type &amp;#34;&amp;#34; value: &amp;#34;{&#xA;    &amp;#34;changed&amp;#34;: true,&#xA;    &amp;#34;cmd&amp;#34;: [&#xA;        &amp;#34;ip&amp;#34;,&#xA;        &amp;#34;rule&amp;#34;,&#xA;        &amp;#34;add&amp;#34;,&#xA;        &amp;#34;from&amp;#34;,&#xA;        &amp;#34;192.168.222.1/24&amp;#34;,&#xA;        &amp;#34;priority&amp;#34;,&#xA;        &amp;#34;101&amp;#34;,&#xA;        &amp;#34;table&amp;#34;,&#xA;        &amp;#34;main&amp;#34;&#xA;    ],&#xA;    &amp;#34;delta&amp;#34;: &amp;#34;0:00:00.002805&amp;#34;,&#xA;    &amp;#34;end&amp;#34;: &amp;#34;2020-02-18 16:17:38.875350&amp;#34;,&#xA;    &amp;#34;failed&amp;#34;: true,&#xA;    &amp;#34;msg&amp;#34;: &amp;#34;non-zero return code&amp;#34;,&#xA;    &amp;#34;rc&amp;#34;: 2,&#xA;    &amp;#34;start&amp;#34;: &amp;#34;2020-02-18 16:17:38.872545&amp;#34;,&#xA;    &amp;#34;stderr&amp;#34;: &amp;#34;RTNETLINK answers: File exists&amp;#34;,&#xA;    &amp;#34;stderr_lines&amp;#34;: [&#xA;        &amp;#34;RTNETLINK answers: File exists&amp;#34;&#xA;    ],&#xA;    &amp;#34;stdout&amp;#34;: &amp;#34;&amp;#34;,&#xA;    &amp;#34;stdout_lines&amp;#34;: []&#xA;}&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So I was checking the rules manually and yes, they were already there. I thought that&amp;rsquo;s an easy case, that must be a simple idempotency issue in the Ansible code. But when looking up the code there was already a &lt;a href=&#34;https://github.com/oVirt/ovirt-ansible-hosted-engine-setup/blob/1.0.35/tasks/bootstrap_local_vm/01_prepare_routing_rules.yml#L76&#34;&gt;condition in place&lt;/a&gt; that should prevent this case from happening. Even after multiple attempts to debug this code, I couldn&amp;rsquo;t find the reason why this check is failing. Eventually I found the GitHub pull request &lt;a href=&#34;https://github.com/oVirt/ovirt-ansible-hosted-engine-setup/pull/96&#34;&gt;#96&lt;/a&gt; where someone was already refactoring this code with a commit message &lt;em&gt;&amp;ldquo;Hardening existing ruleset lookup&amp;rdquo;&lt;/em&gt;. So I forward-ported the patch to the release 1.0.35 which fixed the problem. The PR is already open for more than a year with no indication that it would be merged soon, so I still reported the issue in &lt;a href=&#34;https://github.com/oVirt/ovirt-ansible-hosted-engine-setup/issues/289&#34;&gt;ovirt-ansible-hosted-engine-setup #289&lt;/a&gt;.&#xA;I only found out about &lt;code&gt;ovirt-hosted-engine-cleanup&lt;/code&gt; a few hours later, so with its help you can easily work-around this issue by cleaning up the installation before another retry.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Another though to debug but easy to fix issue popped up after the hosted-engine VM setup completed and the Ansible role was checking the oVirt events for errors:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;2020-02-19 01:46:53,723+0100 ERROR ansible failed {&#xA;    &amp;#34;ansible_host&amp;#34;: &amp;#34;localhost&amp;#34;,&#xA;    &amp;#34;ansible_playbook&amp;#34;: &amp;#34;/usr/share/ovirt-hosted-engine-setup/ansible/trigger_role.yml&amp;#34;,&#xA;    &amp;#34;ansible_result&amp;#34;: {&#xA;        &amp;#34;_ansible_no_log&amp;#34;: false,&#xA;        &amp;#34;changed&amp;#34;: false,&#xA;        &amp;#34;msg&amp;#34;: &amp;#34;The host has been set in non_operational status, deployment errors:   code 4035: Gluster command [] failed on server .,    code 10802: VDSM loki.oasis.home command GlusterServersListVDS failed: The method does not exist or is not available: {&amp;#39;method&amp;#39;: &amp;#39;GlusterHost.list&amp;#39;},   fix accordingly and re-deploy.&amp;#34;&#xA;    },&#xA;    &amp;#34;ansible_task&amp;#34;: &amp;#34;Fail with error description&amp;#34;,&#xA;    &amp;#34;ansible_type&amp;#34;: &amp;#34;task&amp;#34;,&#xA;    &amp;#34;status&amp;#34;: &amp;#34;FAILED&amp;#34;,&#xA;    &amp;#34;task_duration&amp;#34;: 0&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This error is not in the Ansible code anymore but the engine itself fails to query the GlusterFS status on the hypervisor. This is done via &lt;a href=&#34;https://github.com/oVirt/vdsm&#34;&gt;VDSM&lt;/a&gt;, a daemon that runs on each oVirt hypervisor and manages the hypervisor configuration and status. Maybe the VDSM log ( &lt;code&gt;/var/log/vdsm/vdsm.log&lt;/code&gt;) reveals more insights:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;2020-02-19 01:46:45,786+0100 INFO  (jsonrpc/7) [jsonrpc.JsonRpcServer] RPC call Host.getCapabilities succeeded in 3.33 seconds (__init__:312)&#xA;2020-02-19 01:46:45,981+0100 INFO  (jsonrpc/1) [jsonrpc.JsonRpcServer] RPC call GlusterHost.list failed (error -32601) in 0.00 seconds (__init__:312)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Seems that regular RPC calls to VDSM are successful but only the GlusterFS query is failing. I tracked down the source code of this implementation and found that there is a CLI command that can be used to run this query:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# vdsm-client --gluster-enabled -h&#xA;Traceback (most recent call last):&#xA;  File &amp;#34;/usr/lib/python3.6/site-packages/vdsmclient/client.py&amp;#34;, line 276, in find_schema&#xA;    with_gluster=gluster_enabled)&#xA;  File &amp;#34;/usr/lib/python3.6/site-packages/vdsm/api/vdsmapi.py&amp;#34;, line 156, in vdsm_api&#xA;    return Schema(schema_types, strict_mode, *args, **kwargs)&#xA;  File &amp;#34;/usr/lib/python3.6/site-packages/vdsm/api/vdsmapi.py&amp;#34;, line 142, in __init__&#xA;    with io.open(schema_type.path(), &amp;#39;rb&amp;#39;) as f:&#xA;  File &amp;#34;/usr/lib/python3.6/site-packages/vdsm/api/vdsmapi.py&amp;#34;, line 95, in path&#xA;    &amp;#34;, &amp;#34;.join(potential_paths))&#xA;vdsm.api.vdsmapi.SchemaNotFound: Unable to find API schema file, tried: /usr/lib/python3.6/site-packages/vdsm/api/vdsm-api-gluster.pickle, /usr/lib/python3.6/site-packages/vdsm/api/../rpc/vdsm-api-gluster.pickle&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ah, that&amp;rsquo;s better. I love such error messages. Thanks to that it was not so hard to find, that I actually overlooked to install the &lt;code&gt;vdsm-gluster&lt;/code&gt; package on the hypervisor.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;That&amp;rsquo;s it after that the deployment completed successfully:&#xA;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-he-success.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-he-success.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;And finally a screenshot of the oVirt 4.4-alpha administration console. Yes, it works:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/ovirt-4.4-home.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/ovirt-4.4-home.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;&#xA;&lt;p&gt;At the end the of the day most of the issues happened because I was not very familiar with the setup procedure and at the same time refused to follow any setup instructions for an older release. There were a minor bug with the &lt;code&gt;ovirt-engine-dwh&lt;/code&gt; restart issue, that was already fixed upstream but didn&amp;rsquo;t made it yet into the hosted-engine appliance image. Something that is expected in an alpha release.&lt;/p&gt;&#xA;&lt;p&gt;I also quickly setup some VMs to test the basic functionality of oVirt and couldn&amp;rsquo;t find any major issues so far. I guess most people using oVirt are much more experienced with it than me anyway, so there shouldn&amp;rsquo;t be any concerns in trying oVirt 4.4-alpha yourself. To me that was an interesting experience and I&amp;rsquo;m very happy about the Ansible integration that this project is pushing. It was also a nice experience to use Cockpit and I believe that&amp;rsquo;s definitely something that makes this product more appealing to setup and use for a wide range of IT professionals. As long as it can be done via command line too, I&amp;rsquo;ll be happy.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Testing oVirt 4.4-alpha on CentOS 8: Part 1 - Setup GlusterFS</title>
      <link>https://blog.linuxmonk.ch/2020/testing-ovirt-4-4-alpha-on-centos-8-part-1-setup-glusterfs/</link>
      <pubDate>Sun, 23 Feb 2020 20:03:17 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2020/testing-ovirt-4-4-alpha-on-centos-8-part-1-setup-glusterfs/</guid>
      <description>&lt;p&gt;For a while I had a &lt;a href=&#34;https://www.ovirt.org/&#34;&gt;oVirt&lt;/a&gt; server in a &lt;a href=&#34;https://www.ovirt.org/documentation/gluster-hyperconverged/Gluster_Hyperconverged_Guide.html&#34;&gt;hyperconverged&lt;/a&gt; setup which means that the hypervisor was also running a &lt;a href=&#34;https://www.gluster.org/&#34;&gt;GlusterFS&lt;/a&gt; storage server and that the oVirt management virtual machine was inside the oVirt cluster (&lt;a href=&#34;https://www.ovirt.org/documentation/self-hosted/Self-Hosted_Engine_Guide.html&#34;&gt;self-hosted engine&lt;/a&gt;). On top of oVirt I was running a OKD cluster with a &lt;a href=&#34;https://docs.okd.io/3.11/install_config/persistent_storage/persistent_storage_glusterfs.html#overview-containerized-glusterfs&#34;&gt;containerized GlusterFS&lt;/a&gt; cluster that could be used for persistent volumes by the container workload. All of this was running on a single hypervisor with a single SSD which unfortunately gave up on me after a few years in operation. Recently I stumbled upon the &lt;a href=&#34;https://lists.ovirt.org/archives/list/announce@ovirt.org/thread/3AZCAGK4XJOWF636KNUU2YDPIREZ5EAM/&#34;&gt;oVirt 4.4-alpha&lt;/a&gt;. Next to initial support for running it on CentOS 8 also a proper support for &lt;a href=&#34;https://github.com/coreos/ignition&#34;&gt;ignition&lt;/a&gt; that is used by (Fedora and Red Hat) CoreOS and therefore OpenShift/OKD 4 attracted my attention. Why not give it a try and see how far I come&amp;hellip;? After a few hours of tinkering I succeeded the installation:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/ovirt-4.4-host.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/ovirt-4.4-host.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;And now I&amp;rsquo;m going to describe what was necessary to do so. Not everything that I&amp;rsquo;ll mention is brand new. My past experience of setting up such a system is more or less based on the guide &lt;a href=&#34;https://blogs.ovirt.org/2016/08/up-and-running-with-ovirt-4-0-and-gluster-storage/&#34;&gt;Up and Running with oVirt 4.0 and Gluster Storage&lt;/a&gt; that I was following a few years ago, so I&amp;rsquo;m also highlighting a few things that have changed since then.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;If you think about repeating this installation on your hardware please let me remind you: &lt;strong&gt;This software is currently in alpha status.&lt;/strong&gt; This means there are likely still many bugs and rough edges and if you succeed to install it successfully there is no guarantee for updates not breaking everything again. Please don&amp;rsquo;t try this anywhere close to production systems or data. I won&amp;rsquo;t be able to assist you in any way if things turn out badly.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I split this field report into two parts, the first one discussing the GlusterFS storage setup and the &lt;a href=&#34;https://blog.linuxmonk.ch/2020/testing-ovirt-4-4-alpha-on-centos-8-part-2-setup-self-hosted-engine/&#34;&gt;second one&lt;/a&gt; explaining my challenges when setting up the oVirt self-hosted-engine.&lt;/p&gt;&#xA;&lt;h2 id=&#34;hypervisor-disk-layout&#34;&gt;Hypervisor disk layout&lt;/h2&gt;&#xA;&lt;p&gt;I was using a minimal install of a CentOS 8 on a bare-metal server. Make sure you either have two disks or create a separate partition when installing CentOS so that the GlusterFS storage can life on its own block device. My disk layout looks something like this:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[root@loki ~]# lsblk&#xA;NAME                    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT&#xA;sda                       8:0    0 931.5G  0 disk&#xA;├─sda1                    8:1    0   100M  0 part&#xA;├─sda2                    8:2    0   256M  0 part /boot&#xA;├─sda3                    8:3    0    45G  0 part&#xA;│ ├─vg_loki-slash       253:0    0    10G  0 lvm  /&#xA;│ ├─vg_loki-swap        253:1    0     4G  0 lvm  [SWAP]&#xA;│ ├─vg_loki-var         253:2    0     5G  0 lvm  /var&#xA;│ ├─vg_loki-home        253:3    0     2G  0 lvm  /home&#xA;│ └─vg_loki-log         253:4    0     2G  0 lvm  /var/log&#xA;└─sda4                    8:4    0   500G  0 part&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The CentOS installation is placed on a LVM volume group ( &lt;code&gt;vg_loki&lt;/code&gt; on &lt;code&gt;/dev/sda3&lt;/code&gt;) with some individual volumes for dedicated mount points and then there is &lt;code&gt;/dev/sda4&lt;/code&gt; which is an empty disk partition that will be used by GlusterFS later. If you wonder how to do such a setup with the CentOS 8 installer&amp;hellip; I don&amp;rsquo;t know. I tried for a moment to somehow configure this setup in the installer, but eventually I gave up, manually partitioned the disk and created the volume group and then used the pre-generated setup in the installer which perfectly detected what I was doing on the shell.&lt;/p&gt;&#xA;&lt;h2 id=&#34;install-software-requirements&#34;&gt;Install software requirements&lt;/h2&gt;&#xA;&lt;p&gt;First you need to enable the oVirt 4.4-alpha package repository by installing the corresponding release package:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# dnf install https://resources.ovirt.org/pub/yum-repo/ovirt-release44-pre.rpm&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Recently a lot of effort was invested into incorporating the oVirt setup into the &lt;a href=&#34;https://cockpit-project.org/&#34;&gt;Cockpit&lt;/a&gt; Web interface and it&amp;rsquo;s now even the &lt;a href=&#34;https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.3/html/installing_red_hat_virtualization_as_a_self-hosted_engine_using_the_cockpit_web_interface/index&#34;&gt;recommended installation method&lt;/a&gt; for the downstream Red Hat Virtualization (RHV). When I setup my previous hyperconverged oVirt 4.0 this wasn&amp;rsquo;t available back then so of course I&amp;rsquo;m going to try this. To setup Cockpit and the oVirt integration the following packages need to be installed:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# dnf install cockpit cockpit-ovirt-dashboard glusterfs-server&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After logging into Cockpit that runs on the hypervisor host on port 9090 there is a dedicated oVirt tab with two entries:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/ovirt-cockpit-integration.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/ovirt-cockpit-integration.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you continue with the hyperconverged setup, there now even is a dedicated option to install a single node only GlusterFS &amp;ldquo;cluster&amp;rdquo;!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-gluster-single-node.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-gluster-single-node.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;This was a big positive surprise to me because the previously used &lt;a href=&#34;https://github.com/gluster/gdeploy&#34;&gt;gdeploy&lt;/a&gt; tool was insisting on a three node GlusterFS cluster years ago.&lt;/p&gt;&#xA;&lt;h2 id=&#34;running-the-glusterfs-wizard&#34;&gt;Running the GlusterFS wizard&lt;/h2&gt;&#xA;&lt;p&gt;After this revelation the GlusterFS setup is supposedly straight forward. Still I ran into some issues that I could probably have avoided by carefully reading the installation instructions for oVirt 4.3. Nonetheless I&amp;rsquo;m quickly going to mention a few points here in case other people are struggling with the same and search the Web for these error messages:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;On the first screen I had an error that the setup cannot proceed because &lt;code&gt;&amp;quot;gluster-ansible-roles is not installed on Host&amp;quot;&lt;/code&gt;:&#xA;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-gluster-roles-error.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-gluster-roles-error.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&#xA;However, the related package including the Ansible roles from &lt;a href=&#34;https://github.com/gluster/gluster-ansible&#34;&gt;gluster-ansible&lt;/a&gt; was clearly there:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# rpm -q gluster-ansible-roles&#xA;gluster-ansible-roles-1.0.5-7.el8.noarch&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Eventually I found that my sudo rules for my unprivileged user account are not properly picked up by Cockpit so I restarted the setup by using the root account which then successfully detected the Ansible roles.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;When selecting the brick setup the &amp;ldquo;Raid Type&amp;rdquo; must be changed to &amp;ldquo;JBOD&amp;rdquo; and the device name that was reserved for the GlusterFS storage must be entered: &lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-gluster-bricks.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-gluster-bricks.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt; Eventually the wizard will create a dedicated LVM volume group for GlusterFS bricks and a LVM thin-pool volume if you wish so:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# lvs gluster_vg_sda4&#xA;  LV                               VG              Attr       LSize    Pool                             Origin Data%  Meta%  Move Log Cpy%Sync Convert&#xA;  gluster_lv_data                  gluster_vg_sda4 Vwi-aot---  125.00g gluster_thinpool_gluster_vg_sda4        3.35&#xA;  gluster_lv_engine                gluster_vg_sda4 -wi-ao----   75.00g&#xA;  gluster_lv_vmstore               gluster_vg_sda4 Vwi-aot---  300.00g gluster_thinpool_gluster_vg_sda4        0.05&#xA;  gluster_thinpool_gluster_vg_sda4 gluster_vg_sda4 twi-aot--- &amp;lt;421.00g                                         1.03   0.84&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Before the Ansible playbook that will setup the storage is executed the generated inventory file will be displayed. Because I&amp;rsquo;m very familiar with Ansible anyway, I love this part! It also makes it easier to understand which playbook command to run when troubleshooting something on the command line where the Cockpit Web interface doesn&amp;rsquo;t make sense to be involved anymore:&#xA;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-cluster-inventory.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2020/02/cockpit-cluster-inventory.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt; The &amp;ldquo;Enable Debug Logging&amp;rdquo; is definitely worth to be enabled especially if you run this the first time on your server. It gives you much more insight in what Ansible is actually doing on your hypervisor.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;When finally running the &amp;ldquo;Deploy&amp;rdquo; step it didn&amp;rsquo;t take long to fail the playbook with the following error:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;TASK [Check if provided hostnames are valid] ***********************************&#xA;task path: /usr/share/cockpit/ovirt-dashboard/ansible/hc_wizard.yml:29&#xA;fatal: [loki.oasis.home]: FAILED! =&amp;gt; {&amp;#34;msg&amp;#34;: &amp;#34;The conditional check &amp;#39;result.results[0][&amp;#39;stdout_lines&amp;#39;] &amp;gt; 0&amp;#39; failed. The error was: Unexpected templating type error occurred on ({% if result.results[0][&amp;#39;stdout_lines&amp;#39;] &amp;gt; 0 %} True {% else %} False {% endif %}): &amp;#39;&amp;gt;&amp;#39; not supported between instances of &amp;#39;list&amp;#39; and &amp;#39;int&amp;#39;&amp;#34;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;a href=&#34;https://github.com/oVirt/cockpit-ovirt/blame/master/dashboard/static/ansible/hc_wizard.yml#L33&#34;&gt;involved code&lt;/a&gt; is untouched since a long time. So I reported the issue at &lt;a href=&#34;https://bugzilla.redhat.com/show_bug.cgi?id=1806298&#34;&gt;RHBZ #1806298&lt;/a&gt;. I&amp;rsquo;m not sure how this could ever work but the fix is also trivial. After changing the following lines this task was successfully passing:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;  --- /usr/share/cockpit/ovirt-dashboard/ansible/hc_wizard.yml.orig       2020-02-18 14:48:33.678471259 +0100&#xA;  +++ /usr/share/cockpit/ovirt-dashboard/ansible/hc_wizard.yml    2020-02-18 14:48:55.810456470 +0100&#xA;  @@ -30,7 +30,7 @@&#xA;         assert:&#xA;           that:&#xA;           - &amp;#34;result.results[0][&amp;#39;rc&amp;#39;] == 0&amp;#34;&#xA;-          - &amp;#34;result.results[0][&amp;#39;stdout_lines&amp;#39;] &amp;gt; 0&amp;#34;&#xA;+          - &amp;#34;result.results[0][&amp;#39;stdout_lines&amp;#39;] | length &amp;gt; 0&amp;#34;&#xA;         fail_msg: &amp;#34;The given hostname is not valid FQDN&amp;#34;&#xA;       when: gluster_features_fqdn_check | default(true)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Btw. the error message can not only be seen in the Web UI but is also written to a log file: &lt;code&gt;/var/log/cockpit/ovirt-dashboard/gluster-deployment.log&lt;/code&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;There was another issue that cost me more effort to track down. The deployment playbook was failing to add the &lt;a href=&#34;https://firewalld.org/&#34;&gt;firewalld&lt;/a&gt; rules for GlusterFS:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;TASK [gluster.infra/roles/firewall_config : Add/Delete services to firewalld rules] ***&#xA;task path: /etc/ansible/roles/gluster.infra/roles/firewall_config/tasks/main.yml:24&#xA;failed: [loki.oasis.home] (item=glusterfs) =&amp;gt; {&amp;#34;ansible_loop_var&amp;#34;: &amp;#34;item&amp;#34;, &amp;#34;changed&amp;#34;: false, &amp;#34;item&amp;#34;: &amp;#34;glusterfs&amp;#34;, &amp;#34;msg&amp;#34;: &amp;#34;ERROR: Exception caught: org.fedoraproject.FirewallD1.Exception: INVALID_SERVICE: &amp;#39;glusterfs&amp;#39; not among existing services Permanent and Non-Permanent(immediate) operation, Services are defined by port/tcp relationship and named as they are in /etc/services (on most systems)&amp;#34;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Indeed firewalld doesn&amp;rsquo;t know about a &amp;lsquo;glusterfs&amp;rsquo; service:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# rpm -q firewalld&#xA;firewalld-0.7.0-5.el8.noarch&#xA;# firewall-cmd --get-services | grep glusterfs&#xA;#&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Is this an old version? From where do I get the &amp;lsquo;glusterfs&amp;rsquo; firewalld service definition? The solution to this is as simple as embarrassing. I found that the service definition is packaged as part of the &lt;code&gt;glusterfs-server&lt;/code&gt; RPM which was still missing on my server. After installing it also this issue was solved.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Eventually the deployment succeeded and the CentOS 8 host was converted into a single node GlusterFS storage cluster:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# gluster volume status&#xA;Status of volume: data&#xA;Gluster process                             TCP Port  RDMA Port  Online  Pid&#xA;------------------------------------------------------------------------------&#xA;Brick loki.oasis.home:/gluster_bricks/data/&#xA;data                                        49153     0          Y       23806&#xA;&#xA;Task Status of Volume data&#xA;------------------------------------------------------------------------------&#xA;There are no active volume tasks&#xA;&#xA;Status of volume: engine&#xA;Gluster process                             TCP Port  RDMA Port  Online  Pid&#xA;------------------------------------------------------------------------------&#xA;Brick loki.oasis.home:/gluster_bricks/engin&#xA;e/engine                                    49152     0          Y       23527&#xA;&#xA;Task Status of Volume engine&#xA;------------------------------------------------------------------------------&#xA;There are no active volume tasks&#xA;&#xA;Status of volume: vmstore&#xA;Gluster process                             TCP Port  RDMA Port  Online  Pid&#xA;------------------------------------------------------------------------------&#xA;Brick loki.oasis.home:/gluster_bricks/vmsto&#xA;re/vmstore                                  49154     0          Y       24052&#xA;&#xA;Task Status of Volume vmstore&#xA;------------------------------------------------------------------------------&#xA;There are no active volume tasks&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;&#xA;&lt;p&gt;I&amp;rsquo;m super pleased with the installation experience so far. The new GlusterFS Ansible roles had no issues setting up the bricks and volumes. The Cockpit Web-GUI was easy to use and always clearly communicated what was going on. There is now a supported configuration of a one node hyperconverged oVirt setup which makes me happy too. Kudos to everyone involved with this, great work!&lt;/p&gt;&#xA;&lt;p&gt;Now let&amp;rsquo;s continue with the &lt;a href=&#34;https://blog.linuxmonk.ch/2020/testing-ovirt-4-4-alpha-on-centos-8-part-2-setup-self-hosted-engine/&#34;&gt;oVirt self-hosted engine&lt;/a&gt; setup.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>My free software activities (2019-10)</title>
      <link>https://blog.linuxmonk.ch/2019/my-free-software-activities-2019-10/</link>
      <pubDate>Wed, 06 Nov 2019 08:39:22 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2019/my-free-software-activities-2019-10/</guid>
      <description>&lt;p&gt;My activities in October were mostly related to updating &lt;a href=&#34;http://copr.fedorainfracloud.org/coprs/ganto/&#34;&gt;my COPR repositories&lt;/a&gt; for CentOS 8 and cleaning up the old repositories:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;I updated the &lt;a href=&#34;http://copr.fedorainfracloud.org/coprs/ganto/jo/&#34;&gt;ganto/jo&lt;/a&gt; COPR repository to support CentOS 8.&lt;/li&gt;&#xA;&lt;li&gt;I updated the &lt;a href=&#34;http://copr.fedorainfracloud.org/coprs/ganto/vcsh/&#34;&gt;ganto/vcsh&lt;/a&gt; COPR repository to support CentOS 8 and added package builds for the alternative architectures (aarch64 and ppc64le).&lt;/li&gt;&#xA;&lt;li&gt;Thanks to the help of &lt;a href=&#34;https://github.com/jmontleon&#34;&gt;jmontleon&lt;/a&gt; I was finally able to build LXD which is available in my &lt;a href=&#34;http://copr.fedorainfracloud.org/coprs/ganto/lxc3/&#34;&gt;ganto/lxc3&lt;/a&gt; repository for CentOS 8. I also updated the RPM for the latest stable release &lt;a href=&#34;https://discuss.linuxcontainers.org/t/lxd-3-18-has-been-released/5869&#34;&gt;LXD 3.18&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;After years of development the &lt;a href=&#34;https://github.com/lxc/distrobuilder&#34;&gt;distrobuilder&lt;/a&gt; tool which is meant to replace the shellscript-based LXC templates was tagged in a first &lt;a href=&#34;https://discuss.linuxcontainers.org/t/distrobuilder-1-0-has-been-released/5987&#34;&gt;1.0 release&lt;/a&gt; that should now also be able to build CentOS 8 container images. Of course I updated the corresponding RPM in the &lt;a href=&#34;http://copr.fedorainfracloud.org/coprs/ganto/lxc3/&#34;&gt;ganto/lxc3&lt;/a&gt; COPR repository accordingly. I&amp;rsquo;m not sure how they decide to do new releases therefore I might decide to go back building regular git snapshot releases of this tool in the future.&lt;/li&gt;&#xA;&lt;li&gt;I updated the &lt;a href=&#34;http://copr.fedorainfracloud.org/coprs/ganto/goaccess/&#34;&gt;ganto/goaccess&lt;/a&gt; COPR repository to support CentOS 8 and also increased the built &lt;a href=&#34;https://github.com/allinurl/goaccess&#34;&gt;goaccess&lt;/a&gt; version to a git snapshot from May 2019 based on version 1.3. Unfortunately the official &lt;a href=&#34;https://apps.fedoraproject.org/packages/goaccess&#34;&gt;Fedora package&lt;/a&gt; is still only at version 1.2. I was first testing the latest git snapshot but then found that it is affected by a bug (&lt;a href=&#34;https://github.com/allinurl/goaccess/issues/1575&#34;&gt;GitHub issue 1575)&lt;/a&gt; which would fail to render the access graphs properly.&lt;/li&gt;&#xA;&lt;li&gt;The last COPR repository pending an update for CentOS 8 is &lt;a href=&#34;http://copr.fedorainfracloud.org/coprs/ganto/umoci/&#34;&gt;ganto/umoci&lt;/a&gt; which still fails because of &lt;a href=&#34;https://github.com/cpuguy83/go-md2man&#34;&gt;go-md2man&lt;/a&gt; missing from EPEL 8.&lt;/li&gt;&#xA;&lt;li&gt;I deleted some outdated COPR repositories (&lt;a href=&#34;https://github.com/ganto/copr-lxc&#34;&gt;ganto/lxc&lt;/a&gt;, &lt;a href=&#34;https://github.com/ganto/copr-lxd&#34;&gt;ganto/lxd&lt;/a&gt;, &lt;a href=&#34;https://github.com/ganto/copr-lxdock&#34;&gt;ganto/lxdock&lt;/a&gt;) and archived the related GitHub repositories holding the RPM spec files.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Then I was also &lt;a href=&#34;https://github.com/inofix/vagrant-buster-inomail/blob/master/ansible/playbook.yml&#34;&gt;experimenting&lt;/a&gt; with adding Debian machines to a CentOS FreeIPA identity management server via Ansible. Years ago I wrote an Ansible role &lt;a href=&#34;https://github.com/ganto/ansible-freeipa_client&#34;&gt;freeipa-client&lt;/a&gt; which was able to do that but still required manual setup of the Kerberos keytab on the client machine. I plan to replace that with a collection of new roles trying to blend-in with &lt;a href=&#34;https://github.com/debops/debops&#34;&gt;DebOps&lt;/a&gt; as much as possible. But unfortunately nothing ready to show yet.&lt;/p&gt;&#xA;&lt;p&gt;Finally, as always, I updated a lot of ebuilds in my &lt;a href=&#34;https://github.com/ganto/linuxmonk-overlay/&#34;&gt;linuxmonk-overlay&lt;/a&gt; Gentoo overlay.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>My free software activities (2019-09)</title>
      <link>https://blog.linuxmonk.ch/2019/my-free-software-activities-2019-09/</link>
      <pubDate>Tue, 01 Oct 2019 00:21:56 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2019/my-free-software-activities-2019-09/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m starting a new series of blog posts summarizing my various activities regarding free software projects. There might not be every month something worth mentioning, but this month I was quite busy what might be interesting for some of you.&lt;/p&gt;&#xA;&lt;p&gt;Following I&amp;rsquo;ll list some of the activities I was involved regarding free software projects in September:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;After the official &lt;a href=&#34;https://lists.centos.org/pipermail/centos-announce/2019-September/023449.html&#34;&gt;release of CentOS 8&lt;/a&gt;, I started rebuilding the packages in my &lt;a href=&#34;https://copr.fedorainfracloud.org/coprs/ganto/lxc3/&#34;&gt;lxc3 COPR repository&lt;/a&gt; for CentOS 8. The &lt;code&gt;lxd&lt;/code&gt; package is still missing and I&amp;rsquo;m planning to provide it for CentOS 8 together with the pending update to &lt;a href=&#34;https://discuss.linuxcontainers.org/t/lxd-3-17-has-been-released/5679&#34;&gt;lxd-3.17&lt;/a&gt;. A rebuild of the packages in &lt;a href=&#34;https://copr.fedorainfracloud.org/coprs/ganto/&#34;&gt;my various other COPR repositories&lt;/a&gt; can be expected in the coming weeks.&lt;/li&gt;&#xA;&lt;li&gt;Being the package maintainer of the &lt;a href=&#34;https://apps.fedoraproject.org/packages/spectre-meltdown-checker&#34;&gt;spectre-meltdown-checker&lt;/a&gt; package in Fedora and EPEL, I followed the &lt;a href=&#34;https://lists.fedoraproject.org/archives/list/epel-devel@lists.fedoraproject.org/message/HXFHAPXPG2FX4NHP2WDNE3J3JXE53LML/&#34;&gt;instructions&lt;/a&gt; to request a package branch for &lt;a href=&#34;https://download.fedoraproject.org/pub/epel/8/Everything/x86_64/&#34;&gt;epel-8&lt;/a&gt;. This was approved a few hours ago, so the packages is now available via &lt;a href=&#34;https://koji.fedoraproject.org/koji/buildinfo?buildID=1392791&#34;&gt;Koji&lt;/a&gt; and awaits approval in &lt;a href=&#34;https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-fd2c76b524&#34;&gt;Bodhi&lt;/a&gt; for inclusion into the EPEL testing and eventually stable repository. Please give some karma if you&amp;rsquo;d like to accelerate this.&lt;/li&gt;&#xA;&lt;li&gt;I merged some pull-requests in the Gentoo &lt;a href=&#34;https://github.com/Dr-Terrible/go-overlay&#34;&gt;go-overlay&lt;/a&gt; git repository where the original maintainer entrusted me with commit permissions. Because he didn&amp;rsquo;t participate since last December, I used the chance to &lt;a href=&#34;https://github.com/Dr-Terrible/go-overlay/pull/129&#34;&gt;cleanup the repository&lt;/a&gt; to pass the &lt;code&gt;repoman&lt;/code&gt; checks again and eventually merged a &lt;a href=&#34;https://github.com/Dr-Terrible/go-overlay/pull/130&#34;&gt;PR&lt;/a&gt; for the latest traeffik 1.x (&lt;a href=&#34;https://github.com/containous/traefik/releases/tag/v1.7.18&#34;&gt;1.7.18&lt;/a&gt;) release.&lt;/li&gt;&#xA;&lt;li&gt;I put some effort into packaging the &lt;a href=&#34;https://www.gnome.org/news/2019/09/gnome-3-34-released/&#34;&gt;Gnome 3.34&lt;/a&gt; release in my personal Gentoo &lt;a href=&#34;https://github.com/ganto/linuxmonk-overlay&#34;&gt;linuxmonk-overlay&lt;/a&gt;. Of course I&amp;rsquo;m running it on my main workstation on top of Wayland without any major issues so far. Give it a try if you can&amp;rsquo;t wait for the official ebuilds to be ready.&lt;/li&gt;&#xA;&lt;li&gt;I released version 0.1.2 of my &lt;a href=&#34;https://galaxy.ansible.com/ganto/acme_tiny&#34;&gt;acme-tiny Ansible role&lt;/a&gt; which fixes an &lt;a href=&#34;https://github.com/ganto/ansible-acme_tiny/pull/9&#34;&gt;annoying bug&lt;/a&gt;. It could happen that if the certificate renewal was unsuccessful, a still valid certificate would have been overwritten with an empty file. Now the role will make a backup copy of the old certificate by default and validate the new certificate before replacing the old one.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
    </item>
    
    <item>
      <title>A user story about an OKD update from 3.9 to 3.10</title>
      <link>https://blog.linuxmonk.ch/2018/a-user-story-about-an-okd-update-from-3-9-to-3-10/</link>
      <pubDate>Mon, 17 Dec 2018 17:50:09 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2018/a-user-story-about-an-okd-update-from-3-9-to-3-10/</guid>
      <description>&lt;p&gt;The OpenShift community produces a lot of interesting tutorials about how to try new solutions and configurations but unfortunately they are mostly based on a minimal setup such as &lt;a href=&#34;https://www.okd.io/minishift/&#34;&gt;MiniShift&lt;/a&gt;, which is definitely a cool gimmick, but badly resembles a real cluster setup. Often those posts only concentrate on the known good path about how something is supposed to function in the best case. They rarely mention how it could be debugged or fixed if it doesn&amp;rsquo;t work as expected. As all of us know, the more complex a system is, the more can go wrong and this technology is no exception especially when run in a real distributed setup. To give you some insight in how such procedures can go wrong, I&amp;rsquo;d like to share the experience I made when I tried to update my multi-master/multi-node &lt;a href=&#34;https://www.okd.io&#34;&gt;OKD&lt;/a&gt; cluster. As an experienced Linux engineer or developer you might think that version updates are nothing special or exciting, but this experience will disabuse you. I hit many issues and here is how I did it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;IMPORTANT:&lt;/strong&gt; This is not a guide how to upgrade OpenShift. It&amp;rsquo;s only a field report which is missing a lot of technical details for a successful upgrade. Please always investigate the official documentation.&lt;/p&gt;&#xA;&lt;h2 id=&#34;starting-position&#34;&gt;Starting Position&lt;/h2&gt;&#xA;&lt;p&gt;At home I run a small OKD cluster consisting of three masters, each also hosting a etcd member, and four nodes, of which there are two infrastructure nodes, hosting the routers and registry, and two compute nodes, hosting the applications. I feel that&amp;rsquo;s the minimal setup required to resemble a production-like cluster. To make the setup a bit more interesting the persistent storage is served by a &lt;a href=&#34;https://redhatstorage.redhat.com/2017/10/05/container-native-storage-for-the-openshift-masses/&#34;&gt;container-native storage (CNS)&lt;/a&gt; configuration were three GlusterFS pods are distributed on the masters. This definitely deviates from how a production cluster should be setup, but as I&amp;rsquo;m running this locally at home, I don&amp;rsquo;t have enough resources available for separate storage nodes.&lt;/p&gt;&#xA;&lt;p&gt;My masters and nodes are running atop of &lt;a href=&#34;http://www.projectatomic.io/&#34;&gt;CentOS Atomic Host&lt;/a&gt; which I updated to the latest &lt;a href=&#34;https://blog.centos.org/2018/12/centos-atomic-host-7-1811-available-for-download/&#34;&gt;7.1811 release&lt;/a&gt; just a few days ago. As identity provider for OpenShift I&amp;rsquo;m using a &lt;a href=&#34;https://www.freeipa.org&#34;&gt;FreeIPA&lt;/a&gt; server on a separate CentOS box. Since I installed this cluster with OpenShift Origin 3.9 five months ago, it was running stable and I had a lot of fun with it. After the recently published &lt;a href=&#34;https://access.redhat.com/security/vulnerabilities/3716411&#34;&gt;security advisories&lt;/a&gt; time has come to finally take a chance to upgrade OpenShift.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-will-change&#34;&gt;What will change?&lt;/h2&gt;&#xA;&lt;p&gt;The first thing, you should always do before starting an OpenShift update, is to carefully read the &lt;a href=&#34;https://docs.openshift.com/container-platform/3.10/release_notes/ocp_3_10_release_notes.html&#34;&gt;release notes&lt;/a&gt;. I explicitly linked the Red Hat OpenShift Container Platform (OCP) release notes here, because OKD unfortunately doesn&amp;rsquo;t nicely touch up &lt;a href=&#34;https://github.com/openshift/origin/releases/tag/v3.10.0&#34;&gt;theirs&lt;/a&gt;. For the initial release update they are mostly congruent. Make sure to study it carefully, as this might be the primary source of information once something starts going down. For the 3.10 update, an important information is the new handling of the containerized master controller and API services. Eventually we now have a basic idea about what to expect.&lt;/p&gt;&#xA;&lt;h2 id=&#34;updating-the-ansible-inventory&#34;&gt;Updating the Ansible Inventory&lt;/h2&gt;&#xA;&lt;p&gt;It would be nice, if there was a fool-proof command to run the update and it seems that OpenShift 4 with its &lt;a href=&#34;https://github.com/openshift/cluster-version-operator&#34;&gt;Cluster Version Operator&lt;/a&gt; is heading there. But until then we need to carefully study and follow the official &lt;a href=&#34;https://docs.okd.io/3.10/upgrading/index.html&#34;&gt;OKD 3.10 Upgrade Guide&lt;/a&gt;. It&amp;rsquo;s important to get the documentation for the correct release because the involved adjustments to the Ansible inventory are different from release to release. For those not knowing how OpenShift 3.x release upgrades work, it&amp;rsquo;s done via &lt;a href=&#34;https://github.com/openshift/openshift-ansible&#34;&gt;Ansible playbooks&lt;/a&gt; which are using the same inventory (definition on how everything will be configured) as the initial OpenShift cluster installation.&lt;/p&gt;&#xA;&lt;p&gt;In my inventory file, I first added the &lt;a href=&#34;https://docs.okd.io/3.10/upgrading/automated_upgrades.html#upgrades-defining-node-group-and-host-mappings&#34;&gt;Node Group&lt;/a&gt; assignments. E.g. the infrastructure nodes are no longer defined via &lt;code&gt;openshift_node_labels&lt;/code&gt; variable, but via a dedicated &lt;code&gt;openshift_node_group_name&lt;/code&gt; variable which references a node group definition from the &lt;a href=&#34;https://github.com/openshift/openshift-ansible/blob/release-3.10/roles/openshift_facts/defaults/main.yml#L135&#34;&gt;openshift_node_groups&lt;/a&gt; configuration. The same changes have to be done also for the master and the compute nodes:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;OpenShift 3.9:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[infra-nodes:vars]&#xA;# Set region to be dedicated for infrastructure pods&#xA;openshift_node_labels={&amp;#39;region&amp;#39;: &amp;#39;infra&amp;#39;, &amp;#39;zone&amp;#39;: &amp;#39;default&amp;#39;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;OpenShift 3.10:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[infra-nodes:vars]&#xA;# Set infra node group&#xA;openshift_node_group_name=&amp;#39;node-config-infra&amp;#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Note that although the &lt;code&gt;openshift_node_labels&lt;/code&gt; variable is no longer effective, no labels will be removed during the upgrade. So if you don&amp;rsquo;t get the label definition right at the beginning you don&amp;rsquo;t have to worry that after an in-place upgrade some workload is suddenly not scheduled anymore.&lt;/p&gt;&#xA;&lt;p&gt;I had some custom &lt;code&gt;openshift_node_kubelet_args&lt;/code&gt; defined in my OpenShift 3.9 inventory but this variable is also not respected any longer. With 3.10 the correct way to customize the node configuration is to define a &lt;code&gt;edits&lt;/code&gt; argument in the corresponding node group definition, which is then applied to a &lt;code&gt;ConfigMap&lt;/code&gt; resource by the custom &lt;a href=&#34;https://github.com/openshift/openshift-ansible/blob/release-3.10/roles/lib_utils/library/yedit.py&#34;&gt;yedit&lt;/a&gt; Ansible module. While writing such a definition itself is already not super intuitive, it can only be done by re-defining the entire &lt;code&gt;openshift_node_groups&lt;/code&gt; variable, possibly also blowing up every other node group definition if done wrong. For the moment, I chose to drop my custom node configuration entirely to make the inventory less error prone for now.&lt;/p&gt;&#xA;&lt;p&gt;Before running the upgrade playbooks it&amp;rsquo;s also important that every manual configuration update done in the past (e.g. in the &lt;code&gt;master-config.yml&lt;/code&gt;) has to be reflected somewhere in the Ansible inventory. Otherwise the change might be lost after the upgrade. In my setup I still had to add the LDAP authenticator to the &lt;code&gt;openshift_master_identity_providers&lt;/code&gt; variable because I added it manually after the initial cluster installation.&lt;/p&gt;&#xA;&lt;p&gt;The section about &lt;a href=&#34;https://docs.okd.io/3.10/upgrading/automated_upgrades.html#special-considerations-for-glusterfs&#34;&gt;Special Considerations When Using Containerized GlusterFS&lt;/a&gt; gave me a bit of a bad feeling as my GlusterFS pods are running on the control-plane hosts. But it&amp;rsquo;s not an easy task to change that now, so I chose to still go on with the upgrade and hope for a work-around in case something should break.&lt;/p&gt;&#xA;&lt;h2 id=&#34;fixing-a-failed-cns-brick-process&#34;&gt;Fixing a failed CNS Brick Process&lt;/h2&gt;&#xA;&lt;p&gt;Once I felt confident that my inventory was in good shape, I started the control-plane upgrade playbook placed at &lt;code&gt;playbooks/byo/openshift-cluster/upgrades/v3_10/upgrade.yml&lt;/code&gt;. Only after a few minutes it already failed for the first time. The error message said, that my hosted registry presistent volume is not healthy. That are good news, because the playbook did properly detect my unconventional CNS setup and was even able to check the healthiness. Fortunately, this issue was already familiar to me and it was easily fixed. Here is how you do this:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Change to the &lt;code&gt;glusterfs&lt;/code&gt; project (or any custom project where you are running the GlusterFS pods) as a project or cluster administrator and query the names of the GlusterFS pods:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc project glusterfs&#xA;Now using project &amp;#34;glusterfs&amp;#34; on server &amp;#34;https://openshift.example.com:8443&amp;#34;.&#xA;$ oc get pods -n glusterfs -o wide&#xA;NAME                      READY     STATUS    RESTARTS   AGE       IP            NODE&#xA;glusterfs-storage-dz8qj   1/1       Running   3          2d        10.0.0.10     master01.example.com&#xA;glusterfs-storage-jncsl   1/1       Running   3          1d        10.0.0.11     master02.example.com&#xA;glusterfs-storage-r24wg   1/1       Running   2          11h       10.0.0.12     master03.example.com&#xA;heketi-storage-1-w8c42    1/1       Running   1          6d        10.129.0.21   node02.example.com&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Connect to one of the GlusterFS pods and list the volume status. E.g.:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc rsh glusterfs-storage-dz8qj&#xA;sh-4.2# gluster volume status&#xA;Status of volume: glusterfs-registry-volume&#xA;Gluster process                             TCP Port  RDMA Port  Online  Pid&#xA;------------------------------------------------------------------------------&#xA;Brick 10.0.0.11:/var/lib/heketi/mounts/vg_61&#xA;bc5a26248cc6ea9fb7ffaae4edbe93/brick_128dfe&#xA;b5436dad25702e689d3d6f4b8a/brick            49152     0          Y       204&#xA;Brick 10.0.0.12:/var/lib/heketi/mounts/vg_5e&#xA;cf67ed85f71cf28090d7db1acc6433/brick_d36469&#xA;4c7034276c22e264eb2576413b/brick            49152     0          N&#xA;Brick 10.0.0.10:/var/lib/heketi/mounts/vg_49&#xA;e81b0f4c91942c7657e9b7ffff7834/brick_8717e0&#xA;992390a7c04431890ba56b7656/brick            49152     0          Y       224&#xA;Self-heal Daemon on localhost               N/A       N/A        Y       215&#xA;Self-heal Daemon on 10.0.0.11               N/A       N/A        Y       163&#xA;Self-heal Daemon on 10.0.0.12               N/A       N/A        Y       172&#xA;&#xA;Task Status of Volume glusterfs-registry-volume&#xA;------------------------------------------------------------------------------&#xA;There are no active volume tasks&#xA;[...]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;According to my experience it can happen that sometimes a brick displays a &lt;code&gt;N&lt;/code&gt; in the &lt;code&gt;Online&lt;/code&gt; column which means that the corresponding brick process wasn&amp;rsquo;t started successfully. If multiple bricks of the same volume are down, your entire volume is down and must be properly recovered. In such a case don&amp;rsquo;t continue with the steps below!&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Via IP address of the brick, you can figure out which host is affected and then you can simply delete the corresponding pod:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc delete pod glusterfs-storage-r24wg&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The pod will be automatically restarted and the brick processes should come up this time.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;fixing-the-hosted-registry-storage-definition&#34;&gt;Fixing the Hosted Registry Storage Definition&lt;/h2&gt;&#xA;&lt;p&gt;The second run of the control-plane playbook eventually attested that all GlusterFS volumes are healthy but again it failed only two tasks later with a rather cryptic error message, something like:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;TASK [openshift_storage_glusterfs : Check for GlusterFS cluster health] **********************************************************************************************************************************************************************&#xA;task path: /usr/share/ansible/openshift-ansible/roles/openshift_storage_glusterfs/tasks/cluster_health.yml:4&#xA;Using module file /usr/share/ansible/openshift-ansible/roles/lib_utils/library/glusterfs_check_containerized.py&#xA;FAILED - RETRYING: Check for GlusterFS cluster health (120 retries left).Result was: {&#xA;    &amp;#34;attempts&amp;#34;: 1,&#xA;    &amp;#34;changed&amp;#34;: false,&#xA;    &amp;#34;invocation&amp;#34;: {&#xA;        &amp;#34;module_args&amp;#34;: {&#xA;            &amp;#34;cluster_name&amp;#34;: &amp;#34;registry&amp;#34;,&#xA;            &amp;#34;exclude_node&amp;#34;: &amp;#34;master01.example.com&amp;#34;,&#xA;            &amp;#34;oc_bin&amp;#34;: &amp;#34;/usr/local/bin/oc&amp;#34;,&#xA;            &amp;#34;oc_conf&amp;#34;: &amp;#34;/etc/origin/master/admin.kubeconfig&amp;#34;,&#xA;            &amp;#34;oc_namespace&amp;#34;: &amp;#34;default&amp;#34;&#xA;        }&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Didn&amp;rsquo;t it just said, that all the GlusterFS volumes are healthy? What the heck is &lt;code&gt;&amp;quot;cluster_name&amp;quot;: &amp;quot;registry&amp;quot;&lt;/code&gt; and what is it doing with GlusterFS in the &amp;lsquo;default&amp;rsquo; namespace anyway?&lt;/p&gt;&#xA;&lt;p&gt;The solution for this, I found after digging deep in the &lt;a href=&#34;https://github.com/openshift/openshift-ansible/tree/release-3.10/roles/openshift_storage_glusterfs&#34;&gt;openshift_storage_glusterfs&lt;/a&gt; Ansible role and reading the CNS installation instructions again and again. I became a victim of my &amp;ldquo;simplified&amp;rdquo; CNS setup. The reference installation is meant to have two separate CNS GlusterFS clusters. One exclusively for the hosted registry volume (hinted by the &lt;code&gt;[glusterfs_registry]&lt;/code&gt; Ansible host group) and a second cluster for any other persistent volumes (hinted by the &lt;code&gt;[glusterfs]&lt;/code&gt; Ansible host group). As mentioned before, I&amp;rsquo;m limited in available hosts so I added the master hosts to both host groups and set the &lt;code&gt;glusterfs_devices&lt;/code&gt; variable to the same device when installing the CNS. That&amp;rsquo;s already everything that was needed to create the hosted registry volume with OpenShift 3.9 in the &amp;ldquo;regular&amp;rdquo; CNS cluster. However the 3.10 playbook expects the registry volume to be in a different project with a different naming. Fortunately all that was needed to fix this were some additional inventory variables in the &lt;code&gt;[OSEv3:vars]&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Adjust variables for registry storage to match default converged glusterfs storage setup&#xA;openshift_storage_glusterfs_registry_name=storage&#xA;openshift_storage_glusterfs_registry_namespace=glusterfs&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;With the updated inventory I started the control-plane upgrade playbook once more. This time it ran for quite a while and even started to do some real stuff. It replaced the &lt;code&gt;docker run&lt;/code&gt; command in the &amp;lsquo;origin-node&amp;rsquo; systemd service with a &lt;a href=&#34;https://github.com/opencontainers/runc&#34;&gt;runc&lt;/a&gt; command using the 3.10 image. Finally some progress. But eventually another error aborted the playbook and again it was a totally unexpected one.&lt;/p&gt;&#xA;&lt;h2 id=&#34;etcd-backup-failure&#34;&gt;etcd Backup Failure&lt;/h2&gt;&#xA;&lt;p&gt;Before updating the &lt;a href=&#34;https://docs.okd.io/3.10/architecture/infrastructure_components/kubernetes_infrastructure.html#master&#34;&gt;etcd&lt;/a&gt; cluster, there is a task which would backup the etcd database and this failed miserably. It couldn&amp;rsquo;t run &lt;code&gt;docker exec etcd_container etcdctl backup [...]&lt;/code&gt;. When executing the command manually on a master host, I received the same error message:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused &amp;#34;process_linux.go:110: decoding init error from pipe caused \&amp;#34;read parent: connection reset by peer\&amp;#34;&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;My first suspicion was the Ansible role. Maybe the backup command is wrong? But I couldn&amp;rsquo;t find any radical changes in the commit history regarding the etcd backup and a blocking issue like this is unlikely to stay unnoticed for such a long time. Maybe something wrong with the image? The OpenShift Origin 3.9 setup was using a rather atypical image at that time, the only one from the Fedora image registry ( &lt;code&gt;registry.fedoraproject.org/latest/etcd:latest&lt;/code&gt;). When I see the &amp;rsquo;latest&amp;rsquo; tag being used with containers I&amp;rsquo;m instantly suspicious that bugs might sneak in unnoticed as different users may get different images depending on when they are pulling them. Maybe they mistakenly pushed an image without a shell or without the &lt;code&gt;etcdctl&lt;/code&gt; binary? So I tried to ask in the #openshift IRC channel on Freenode if someone experienced the same issue before but didn&amp;rsquo;t get any reply. Suddenly I had an idea: Only a few hours before I was using the &lt;code&gt;etcdctl&lt;/code&gt; tool from the Atomic host to do my own etcd backup. I just need to find a way to make Ansible use the &lt;code&gt;etcdctl&lt;/code&gt; from the host and everything would be fine. So I was digging a bit in the Ansible &lt;a href=&#34;https://github.com/openshift/openshift-ansible/tree/release-3.10/roles/etcd&#34;&gt;etcd&lt;/a&gt; role and a few minutes later I set &lt;a href=&#34;https://github.com/openshift/openshift-ansible/blob/release-3.10/roles/etcd/defaults/main.yaml#L31&#34;&gt;r_etcd_common_etcdctl_command&lt;/a&gt; to &lt;code&gt;&amp;quot;etcdctl&amp;quot;&lt;/code&gt; in my inventory, being confident that this would fix my issue. It won&amp;rsquo;t, but I won&amp;rsquo;t find out anytime soon&amp;hellip;&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-master-api-cannot-find-the-ldap-ca-certificate&#34;&gt;The Master API cannot find the LDAP CA Certificate&lt;/h2&gt;&#xA;&lt;p&gt;In the next attempt, the playbook happily ran the etcd backup, upgraded the etcd images, converted them to be a &lt;a href=&#34;https://kubernetes.io/docs/tasks/administer-cluster/static-pod/&#34;&gt;static pod&lt;/a&gt; on all masters and did the same for the other two control plane services, the API service and the controller service, starting on the first master. Eventually the &amp;lsquo;origin-master-api&amp;rsquo; and &amp;lsquo;origin-master-controller&amp;rsquo; services were shutdown and the corresponding pods should be started, so the playbook was waiting for the API service to come up and waited and waited&amp;hellip; The pod didn&amp;rsquo;t come up. Hmpf. Time has already come to use the new debugging command I read about in the release notes to see what&amp;rsquo;s going on:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# /usr/local/bin/master-logs api api&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That is an alternative for the corresponding &lt;code&gt;oc&lt;/code&gt; command that I&amp;rsquo;m also able to run from my client machine:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc logs master-api-node01.example.com -n kube-system&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;But the latter one was behaving weird. Sometimes it hung although the API services of the two other nodes were still up. There is definitely something wrong.&lt;/p&gt;&#xA;&lt;p&gt;When checking the logs locally, I saw an error that my FreeIPA CA certificate which should be used to validate the LDAPS connections cannot be found. That&amp;rsquo;s strange. I explicitly configured the &lt;code&gt;ca&lt;/code&gt; key in the &lt;code&gt;openshift_master_identity_providers&lt;/code&gt; variable pointing it to the correct CA certificate. I did this in other OpenShift cluster inventories before and there it was working&amp;hellip; But those were not running OpenShift 3.10 or later. With 3.10 the playbook developers removed the possibility to custom-name the CA certificate so the &lt;code&gt;ca&lt;/code&gt; key from the inventory was silently ignored. Only after checking the installation instructions regarding &lt;a href=&#34;https://docs.okd.io/3.10/install_config/configuring_authentication.html#identity-providers-ansible&#34;&gt;Configuring identity providers with Ansible&lt;/a&gt;, I found an inconspicuous comment that the CA certificate destination path now follows a given naming convention. When I was adding the identity provider configuration to the inventory before the update, I didn&amp;rsquo;t specify the &lt;code&gt;openshift_master_openid_ca&lt;/code&gt; or &lt;code&gt;openshift_master_openid_ca_file&lt;/code&gt; variables which will ensure that the CA certificate is copied to the correct place. After all the certificates were already on the master hosts and the identity provider was working, so I didn&amp;rsquo;t want the upgrade playbook to touch the certificate. Now that&amp;rsquo;s the result: My mistake. Still, I like issues that are clear and can be fixed so easily. A quick rename of the certificate on the master hosts made the API service successfully start again.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-a-docker-bug-broke-the-etcd-cluster&#34;&gt;How a Docker Bug broke the etcd Cluster&lt;/h2&gt;&#xA;&lt;p&gt;All API servers are running again, although only the first one in the final configuration, but the &lt;code&gt;oc&lt;/code&gt; command invocation still feel sluggish. Sometimes it even hangs completely. When checking the process list it attracted my attention that the etcd processes are only a few minutes old and sometimes they are not running at all. So I was checking the etcd cluster health and here it is: Two cluster members are down and one is in the state unhealthy. That is bad&amp;hellip; Immediately, I started manually triggering etcd restarts. But only a few minutes later they shutdown again. I was checking the log files and there were errors, but I couldn&amp;rsquo;t figure out a single reason what might cause this mess. Then I found that the &lt;code&gt;/etc/etcd/etcd.conf&lt;/code&gt; was updated during the playbook run, so I restored the backup, but again it wouldn&amp;rsquo;t fix the issue. Eventually I started to accept the thought that I might need to completely restore the etcd database from a backup because the database might already be so corrupt in the mean time that it is not able to find a stable state anymore.&lt;/p&gt;&#xA;&lt;p&gt;The OKD documentation for &lt;a href=&#34;https://docs.okd.io/3.10/admin_guide/assembly_restore-etcd-quorum.html&#34;&gt;Restoring etcd quorum&lt;/a&gt; would be the correct guide that you need to follow in this situation, but for a reason I landed at &lt;a href=&#34;https://docs.okd.io/3.10/day_two_guide/host_level_tasks.html#restoring-etcd_deprecating-etcd&#34;&gt;Restoring etcd&lt;/a&gt;. That confronted me with yet another issue: This guide was not yet properly updated for OpenShift 3.10. Some parts of the documentation still reference etcd as systemd service. But in my setup it&amp;rsquo;s a pod. Trying to pass the &lt;code&gt;--force-new-cluster&lt;/code&gt; parameter to the etcd process via systemd override obviously doesn&amp;rsquo;t have any effect. Eventually I found out about the &lt;code&gt;/etc/origin/node/pod/etcd.yaml&lt;/code&gt; file which contains the pod definition. And here we are able to correctly pass the parameter so that it is picked up by the pod startup command. But again, even with an empty database, a few minutes later my pod would die again. Something is badly broken here. In the YAML definition I also found the liveness probe. So once the pod was started once more, I tried to execute the liveness probe to see what it returns and the result looked familiar, in a bad way:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused &amp;#34;process_linux.go:110: decoding init error from pipe caused \&amp;#34;read parent: connection reset by peer\&amp;#34;&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Ouch! Now I understand why the pods keep restarting. It&amp;rsquo;s again the same error that also caused the etcd backup failure before. But now I&amp;rsquo;m using the new &lt;code&gt;quay.io/coreos/etcd:v3.2.22&lt;/code&gt; image. This disproved my theory that a buggy image might be the reason. For the moment, I ran out of ideas&amp;hellip; Until I remembered that I recently read &lt;a href=&#34;https://fy.blackhats.net.au/blog/html/2018/12/09/work_around_docker_exec_bug.html&#34;&gt;a post&lt;/a&gt; about a docker bug (&lt;a href=&#34;https://bugzilla.redhat.com/show_bug.cgi?id=1655214&#34;&gt;#1655214&lt;/a&gt;) that affected CentOS 7. Thanks for that! After checking the docker version on Atomic host 7.1811 ( &lt;code&gt;docker-1.13.1-84.git07f3374.el7.centos&lt;/code&gt;) it&amp;rsquo;s confirmed. That&amp;rsquo;s the root cause for so much trouble so far.&lt;/p&gt;&#xA;&lt;h2 id=&#34;updating-docker-on-atomic-host&#34;&gt;Updating Docker on Atomic Host&lt;/h2&gt;&#xA;&lt;p&gt;I didn&amp;rsquo;t need to dig too much into Atomic Host so far, as most of the stuff was simply working or was easily fixed with an update in the past. But this time it didn&amp;rsquo;t look that there is an imminent update. Release 7.1811 was only a few days old. I could roll back, but the &lt;a href=&#34;https://wiki.centos.org/SpecialInterestGroup/Atomic/Download#line-66&#34;&gt;previous version&lt;/a&gt; is 7.1808. That&amp;rsquo;s three months back and somehow defeats the purpose of my update, to get the latest security fixes. Fortunately CentOS already released new docker packages where this bug is fixed. Now I just need to find a way to update the docker packages independently from the ostree image? This time the documentation gods were on my side. I quickly found Dusty Mabe&amp;rsquo;s &lt;a href=&#34;https://dustymabe.com/2017/09/02/atomic-host-101-lab-part-4-package-layering-experimental-features/&#34;&gt;Atomic Host 101 Lab Part 4: Package Layering, Experimental Features&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Here my guide for quickly working around Bug #1655214 by updating the docker packages to release &lt;code&gt;1.13.1-88.git07f3374.el7.centos&lt;/code&gt; on CentOS Atomic Host:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Create a temporary directory and download the corresponding RPM packages from a mirror of your choice:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# mkdir /tmp/docker-1.13.1-88&#xA;# cd /tmp/docker-1.13.1-88&#xA;# for pkg in docker docker-client docker-common docker-lvm-plugin docker-novolume-plugin ; do \&#xA;    curl -O https://mirror.init7.net/centos/7/extras/x86_64/Packages/$pkg-1.13.1-88.git07f3374.el7.centos.x86_64.rpm ; \&#xA;  done&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;From within the directory run &lt;code&gt;rpm-ostree override replace&lt;/code&gt; to replace the docker packages from the ostree layer with the new RPMs:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# rpm-ostree override replace docker*&#xA;Checking out tree ee5a6f2... done&#xA;Inactive requests:&#xA;  docker (already provided by docker-2:1.13.1-84.git07f3374.el7.centos.x86_64)&#xA;Enabled rpm-md repositories: base updates extras&#xA;Updating metadata for &amp;#39;base&amp;#39;: [=============] 100%&#xA;rpm-md repo &amp;#39;base&amp;#39;; generated: 2018-11-25 16:00:34&#xA;Updating metadata for &amp;#39;updates&amp;#39;: [=============] 100%&#xA;rpm-md repo &amp;#39;updates&amp;#39;; generated: 2018-12-10 15:34:27&#xA;Updating metadata for &amp;#39;extras&amp;#39;: [=============] 100%&#xA;rpm-md repo &amp;#39;extras&amp;#39;; generated: 2018-12-10 16:00:03&#xA;Importing metadata [=============] 100%&#xA;Resolving dependencies... done&#xA;Relabeling (5/5) [=============] 100%&#xA;Applying 5 overrides&#xA;Processing packages (10/10) [=============] 100%&#xA;Running pre scripts... 1 done&#xA;Running post scripts... 5 done&#xA;Writing rpmdb... done&#xA;Writing OSTree commit... done&#xA;Copying /etc changes: 42 modified, 5 removed, 613 added&#xA;Transaction complete; bootconfig swap: no; deployment count change: 0&#xA;Freed: 580.5 kB (pkgcache branches: 0)&#xA;Upgraded:&#xA;  docker 2:1.13.1-84.git07f3374.el7.centos -&amp;gt; 2:1.13.1-88.git07f3374.el7.centos&#xA;  docker-client 2:1.13.1-84.git07f3374.el7.centos -&amp;gt; 2:1.13.1-88.git07f3374.el7.centos&#xA;  docker-common 2:1.13.1-84.git07f3374.el7.centos -&amp;gt; 2:1.13.1-88.git07f3374.el7.centos&#xA;  docker-lvm-plugin 2:1.13.1-84.git07f3374.el7.centos -&amp;gt; 2:1.13.1-88.git07f3374.el7.centos&#xA;  docker-novolume-plugin 2:1.13.1-84.git07f3374.el7.centos -&amp;gt; 2:1.13.1-88.git07f3374.el7.centos&#xA;Run &amp;#34;systemctl reboot&amp;#34; to start a reboot&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Reboot the host.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I carefully did this on one master server after the other and surprisingly all the services (except etcd) were started normally. Even my GlusterFS pods came up again as nothing had happened. But still, the etcd cluster was offline and with it the Master API was inaccessible. No &lt;code&gt;oc&lt;/code&gt; commands were possible.&lt;/p&gt;&#xA;&lt;h2 id=&#34;fixing-the-etcd-cluster&#34;&gt;Fixing the etcd Cluster&lt;/h2&gt;&#xA;&lt;p&gt;With the docker issue being fixed, I now had to bring up the etcd cluster again. The database was likely in a confused state because of all the failed attempts before, so I decided to restore a known good state. As briefly mentioned before, to do so, you actually create a new cluster with the database from a backup. Because the OpenShift documentation on how to do this cannot be followed easily, I list the exact steps below how I manged to do it:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Make sure that all the etcd processes are down and not coming up again automatically. On an OpenShift 3.10 cluster, you prevent automatic startup by moving the &lt;code&gt;/etc/origin/node/pod/etcd.yaml&lt;/code&gt; definition to a backup location e.g. &lt;code&gt;/etc/origin/node/pod/disabled/&lt;/code&gt; on every etcd host.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;First create a new one node etcd cluster on the first etcd host. To do so, we need some preparation:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The &lt;code&gt;/etc/etcd/etcd.conf&lt;/code&gt; configuration must not contain any previous configurations regarding the &lt;code&gt;INITIAL_CLUSTER&lt;/code&gt; or &lt;code&gt;INITIAL_CLUSTER_STATE&lt;/code&gt;. I was able to simply use the &lt;code&gt;etcd.conf&lt;/code&gt; generated by the upgrade playbook which already set those two variables to the correct value:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ETCD_INITIAL_CLUSTER=&#xA;ETCD_INITIAL_CLUSTER_STATE=new&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Also make sure, the &lt;code&gt;ETCD_INITIAL_ADVERTISE_PEER_URLS&lt;/code&gt; only contains the URL of the first host itself and no other peers:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ETCD_INITIAL_ADVERTISE_PEER_URLS=https://10.0.0.10:2380&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Restore the etcd database from a backup. Fortunately the upgrade playbook automatically created a backup after the etcd upgrade, so I&amp;rsquo;m going to restore to that state:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# mv /var/lib/etcd/member /var/lib/etcd/member.orig&#xA;# cp -rP /var/lib/etcd/openshift-backup-post-3.0-20181214022846/member /var/lib/etcd/&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;When starting the first etcd member for the first time, we need to pass the &lt;code&gt;--force-new-cluster&lt;/code&gt; argument to the process. This will override the cluster definition from the database files. To do so, the &lt;code&gt;etcd.yaml&lt;/code&gt; file has to be adjusted. Here the important snippet (everything else should be kept as it is):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;      spec:&#xA;        containers:&#xA;  - args:&#xA;    - &amp;#39;#!/bin/sh&#xA;&#xA;      set -o allexport&#xA;&#xA;      source /etc/etcd/etcd.conf&#xA;&#xA;      exec etcd --force-new-cluster&#xA;&#xA;      &amp;#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;If everything is ready to start the etcd process, move the altered &lt;code&gt;etcd.yaml&lt;/code&gt; file back to the &lt;code&gt;/etc/origin/node/pod&lt;/code&gt; directory. Within a few moments, the pod should startup and create a new cluster.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Check the initial cluster state via:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# etcdctl2 cluster-health&#xA;member 67aa8b8cc701 is healthy: got healthy result from https://10.0.0.10:2379&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If something went wrong, you might want to check the logs via:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# /usr/local/bin/master-logs etcd etcd&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Initially the first member still advertises a &lt;code&gt;PeerURL&lt;/code&gt; pointing to &amp;rsquo;localhost&amp;rsquo;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# etcdctl2 member list&#xA;67aa8b8cc701: name=master01.example.com peerURLs=http://localhost:2380 clientURLs=https://10.0.0.10:2379 isLeader=true&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This must be updated by the correct host URL pointing to itself:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# etcdctl2 member update 67aa8b8cc701 https://10.0.0.10:2380&#xA;Updated member with ID 67aa8b8cc701 in cluster&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then it correctly shows:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# etcdctl2 member list&#xA;67aa8b8cc701: name=master01.example.com peerURLs=https://10.0.0.10:2380 clientURLs=https://10.0.0.10:2379 isLeader=true&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;This configuration was automatically saved in the database. So the &lt;code&gt;--force-new-cluster&lt;/code&gt; argument can be removed again. Edit the &lt;code&gt;etcd.yaml&lt;/code&gt; in-place to restore the original configuration. After doing so, restart the etcd process with:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# /usr/local/bin/master-restart etcd&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If it comes up again and shows healthy, we can continue the add the other two cluster members.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The following steps to add another cluster member obviously have to be done on for both other etcd hosts:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Add the new host to the cluster by executing the following command on the first etcd host:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# etcdctl2 member add master02.example.com https://10.0.0.11:2380&#xA;Added member name master02.example.com with ID a6b2e8d0d392083b to cluster&#xA;&#xA;ETCD_NAME=&amp;#34;member02.example.com&amp;#34;&#xA;ETCD_INITIAL_CLUSTER=&amp;#34;member01.example.com=https://10.0.0.10:2380,member02.example.com=https://10.0.0.11:2380&amp;#34;&#xA;ETCD_INITIAL_CLUSTER_STATE=&amp;#34;existing&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The new member will then be displayed as &amp;lsquo;unstarted&amp;rsquo; in the member list.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Prepare the &lt;code&gt;/etc/etcd/etcd.conf&lt;/code&gt; file on the new etcd host by defining the variables as shown in the output of the &lt;code&gt;etcdctl2 member add&lt;/code&gt; command above. The &lt;code&gt;ETCD_INITIAL_CLUSTER&lt;/code&gt; value will automatically be extended with each new member added to the cluster.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Delete the old database on the new etcd host. It will automatically be synced from the other cluster members once the new node has joined:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# mv /var/lib/etcd/member /var/lib/etcd/member.orig&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Enable the etcd pod by moving the &lt;code&gt;etcd.yaml&lt;/code&gt; back to &lt;code&gt;/etc/origin/node/pod&lt;/code&gt;. Within a few minutes the etcd process should be started and eventually join the etcd cluster.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Once the etcd cluster was restored, the &lt;code&gt;oc&lt;/code&gt; command was finally working again and I could check the state of the etcd pods also via OpenShift client:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc get pods -n kube-system | grep etcd&#xA;master-etcd-master01.example.com          1/1       Running   5          1h&#xA;master-etcd-master02.example.com          1/1       Running   0          47m&#xA;master-etcd-master03.example.com          1/1       Running   0          2m&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;During the entire time the etcd cluster was down the OpenShift cluster continued running. The registry, routers and applications such as &lt;a href=&#34;https://blog.linuxmonk.ch/2018/gitea-on-openshift-with-nodeport-ssh-access/&#34;&gt;my Gitea setup&lt;/a&gt; were online all the time and even the CNS cluster running on the master hosts handled the debugging and restart session with bravery. Fortunately I had a super static setup during that time and so no deployments or replica count enforcement needed to be executed which would have been impossible anyway. Still I feel it&amp;rsquo;s a positive fact that shows the resiliency the platform has gained over time.&lt;/p&gt;&#xA;&lt;h2 id=&#34;finishing-the-control-plane-upgrade&#34;&gt;Finishing the Control Plane Upgrade&lt;/h2&gt;&#xA;&lt;p&gt;After a longer detour, I was finally back at the point were I could start another run of the control plane upgrade playbook. Remember, when the playbook aborted before it did so after upgrading the control plane services on the first master node, there are still two to go. So I started the playbook once again.&lt;/p&gt;&#xA;&lt;p&gt;By now I have a really good feeling about the state of the playbook in this release. As you can see above, it failed on me many times in all different stages of the update, but it always had a good reason and it was always able to pick up where it left. My experience with initial upgrade attempts of earlier OpenShift releases was unfortunately not always that good. For example it happened to me that I had to restore a master host from a snapshot, because the playbook failed to correctly detect the upgrade state in the second run, after it aborted the first run due to a syntax error in a &lt;a href=&#34;https://docs.okd.io/3.10/upgrading/automated_upgrades.html#upgrade-hooks&#34;&gt;post-upgrade task&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This time the playbook finished successfully and my control plane was finally at release 3.10:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# /usr/local/bin/oc version&#xA;oc v3.10.0+c99b16a-90&#xA;kubernetes v1.10.0+b81c8f8&#xA;features: Basic-Auth GSSAPI Kerberos SPNEGO&#xA;&#xA;Server https://openshift.example.com:8443&#xA;openshift v3.10.0+c99b16a-90&#xA;kubernetes v1.10.0+b81c8f8&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;running-the-node-upgrade-playbook&#34;&gt;Running the Node Upgrade Playbook&lt;/h2&gt;&#xA;&lt;p&gt;After the control-plane was done, I had to upgrade the infrastructure and compute nodes. A separate playbook placed at &lt;code&gt;playbooks/byo/openshift-cluster/upgrades/v3_10/upgrade_nodes.yml&lt;/code&gt; is available. Initially I only wanted to run it on a single node to make sure everything works as expected. This can be done by passing the &lt;code&gt;-e openshift_upgrade_nodes_label=kubernetes.io/hostname=node03.example.com&lt;/code&gt; argument, where the given host name is obviously the node that should be upgraded, to the playbook execution command. The playbook completed without error already on the first attempt. So I continued with the other nodes.&lt;/p&gt;&#xA;&lt;p&gt;One fact is super important when upgrading the nodes to OpenShift 3.10. The &lt;code&gt;/etc/origin/node/node-config.yaml&lt;/code&gt; is completely regenerated based on the settings in the corresponding node group (and/or the &lt;a href=&#34;https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_node_group/templates/node-config.yaml.j2&#34;&gt;defaults&lt;/a&gt;) and so any prior adjustment not reflected in the inventory is lost. Therefore make sure that you perfectly understand the &lt;a href=&#34;https://docs.okd.io/3.10/install/configuring_inventory_file.html#configuring-inventory-defining-node-group-and-host-mappings&#34;&gt;Node Group&lt;/a&gt; concept and how it affects your node layout and configuration.&lt;/p&gt;&#xA;&lt;p&gt;To give you an example how to customize the upgrade behavior on the infrastructure nodes, I added the following arguments to the playbook execution: &lt;code&gt;-e openshift_upgrade_nodes_label=region=infra -e openshift_upgrade_nodes_serial=50%&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;fixing-the-infrastructure-node-selector&#34;&gt;Fixing the Infrastructure Node Selector&lt;/h2&gt;&#xA;&lt;p&gt;It confused me that the &lt;a href=&#34;https://docs.okd.io/3.10/admin_guide/scheduling/pod_placement.html#constraining-pod-placement-nodeselector&#34;&gt;NodeSelector&lt;/a&gt; of the infrastructure components such as the registry and routers were not updated to the new defaults. In the inventory I explicitly defined the new node selector:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;openshift_hosted_registry_selector=&amp;#39;node-role.kubernetes.io/infra=true&amp;#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;But when checking the &lt;code&gt;DeploymentConfig&lt;/code&gt; of the registry, I can still find the old &lt;code&gt;NodeSelector&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc get dc docker-registry -n default -o json | jq .spec.template.spec.nodeSelector&#xA;{&#xA;  &amp;#34;region&amp;#34;: &amp;#34;infra&amp;#34;&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So I manually triggered an update of the &lt;code&gt;NodeSelector&lt;/code&gt; property in all the &lt;code&gt;DeploymentConfig&lt;/code&gt; s using it. E.g.:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc patch dc docker-registry -n default --type json --patch &amp;#39;[{&amp;#34;op&amp;#34;:&amp;#34;replace&amp;#34;,&amp;#34;path&amp;#34;:&amp;#34;/spec/template/spec/nodeSelector&amp;#34;,&amp;#34;value&amp;#34;:{&amp;#34;node-role.kubernetes.io/infra&amp;#34;:&amp;#34;true&amp;#34;}}]&amp;#39;&#xA;deploymentconfig &amp;#34;docker-registry&amp;#34; patched&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;NodeSelector&lt;/code&gt; s can also be set in &lt;code&gt;DaemonSet&lt;/code&gt; s, as annotations in projects or even globally via &lt;code&gt;master-config.yaml&lt;/code&gt;. Therefore make sure to update them all, when required, before removing any labels from the nodes.&lt;/p&gt;&#xA;&lt;p&gt;After checking that all the pods are up and running again, I was finally able to remove the old infrastructure labels from the nodes:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc label node node01.example.com region- zone-&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;summarizing&#34;&gt;Summarizing&lt;/h2&gt;&#xA;&lt;p&gt;This was not my first OpenShift update ever, but my first update from 3.9 to 3.10. This obviously means that I made some mistakes and had wrong assumptions from which I did learn a lot. I hope I could share some insights and useful hints for those of you that haven&amp;rsquo;t done this before. Otherwise it will at least help me in the future to run this update an other cluster much smoother.&lt;/p&gt;&#xA;&lt;p&gt;At the end some advice for those of you who also need to do such an upgrade:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;em&gt;You need to have a test cluster&lt;/em&gt; where you can practice such updates. It doesn&amp;rsquo;t need to be big but the Ansible inventory variables should be structurally as similar as possible to those of the production cluster. As you saw above, a lot of errors just happened due to wrong inventory variables. Ideally the test cluster should have some workload so that you experience how the applications behave during the update and and so that you can test if everything still works after an upgrade.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;em&gt;Emphasis your Ansible inventory&lt;/em&gt;. Everything of your configuration that can fit into the Ansible inventory must be defined there and must be maintained there. It can cost you a lot of time debugging or even result in application downtime during an upgrade if you manually updated the cluster configuration without adjusting the configuration in the inventory. Even when it sometimes feels like it&amp;rsquo;s more work than benefit it&amp;rsquo;s always worth it.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;em&gt;Preparation is key&lt;/em&gt;. Carefully read through the upstream documentation available. Most likely you also have some internal documentation where your infrastructure specifics are written down. Run the upgrade on a test cluster before you do it in production. If it doesn&amp;rsquo;t work on the first attempt, update your notes and try it again. Try to gain as much experience as possible on the test infrastructure so that you already know what to do if something goes wrong in production.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;em&gt;Plan a lot of time&lt;/em&gt;. Doing such an upgrade is a lot of work! Give yourself enough time to do a proper preparation and also the actual upgrade window itself should give you enough time to fix issues when they arise. Plan in the scale of hours or better days. Ansible is slow. If you have to restart the playbook because of an error after 15 minutes this will eat up your time fast.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Thanks for reading. As always I&amp;rsquo;d welcome some feedback or critics in the comments.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Gitea on OpenShift with NodePort SSH access</title>
      <link>https://blog.linuxmonk.ch/2018/gitea-on-openshift-with-nodeport-ssh-access/</link>
      <pubDate>Wed, 12 Dec 2018 03:48:34 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2018/gitea-on-openshift-with-nodeport-ssh-access/</guid>
      <description>&lt;p&gt;The first thing that someone would need when operating or playing around with &lt;a href=&#34;https://www.okd.io/&#34;&gt;OKD&lt;/a&gt; (better known as OpenShift) is a git version control service. Personally I&amp;rsquo;m a fan of &lt;a href=&#34;https://gitea.io/&#34;&gt;Gitea&lt;/a&gt; and that&amp;rsquo;s why I&amp;rsquo;d like to show a way how to run Gitea in a OpenShift environment. Gitea upstream already provides a great &lt;a href=&#34;https://hub.docker.com/r/gitea/gitea/&#34;&gt;container image&lt;/a&gt; which I&amp;rsquo;m are going to use. But as some of you may have already experienced, running an image on docker and running it in OpenShift is two different pairs of shoes. The fact that the Gitea image runs an integrated SSH server means that it doesn&amp;rsquo;t simply match the widely discussed Web application pattern. Therefore I&amp;rsquo;m trying to explain some of the difficulties that one might encounter when moving such an application to OpenShift.&lt;/p&gt;&#xA;&lt;p&gt;My environment consists of a multi-node OpenShift cluster. Obviously Gitea should be high available so that if a node goes down, one would still be able to access the git repositories. &lt;em&gt;One pod is no pod&lt;/em&gt;, so Gitea must be deployed with a replica count of at least two. Accessing the pods over HTTP is already solved by the OpenShift default infrastructure via redundant HAProxy routers. I&amp;rsquo;d probably explain how to achieve a redundant router setup in one of my next blog posts but this time I&amp;rsquo;d like to emphasis on the Gitea SSH access via &lt;a href=&#34;https://docs.okd.io/latest/dev_guide/expose_service/expose_internal_ip_nodeport.html&#34;&gt;NodePort&lt;/a&gt; service feature. The following graphic shows a communication overview of such a setup:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2018/12/openshift-gitea.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2018/12/openshift-gitea.png&#34; alt=&#34;&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;nodeport-service&#34;&gt;NodePort Service&lt;/h2&gt;&#xA;&lt;p&gt;In OpenShift the Kubernetes &lt;a href=&#34;https://kubernetes.io/docs/concepts/services-networking/service/&#34;&gt;Service&lt;/a&gt; resource is responsible for directing the traffic (TCP, UDP or SCTP) to the individual application pods. It maps the service name (e.g. &amp;lsquo;gitea&amp;rsquo;) via &lt;a href=&#34;https://www.redhat.com/en/blog/red-hat-openshift-container-platform-dns-deep-dive-dns-changes-red-hat-openshift-container-platform-36&#34;&gt;SkyDNS&lt;/a&gt; to a so-called &lt;code&gt;ClusterIP&lt;/code&gt;. This is a virtual IP address that is not assigned to any host or container network interface but still used as packet destination within the cluster SDN (software defined network). After receiving a packet to this so-called &lt;code&gt;ClusterIP&lt;/code&gt; the Linux kernel of an OpenShift node rewrites the packet destination to an IP address of an actual application pod and acts as a virtual network load-balancer.&lt;/p&gt;&#xA;&lt;p&gt;In our example there is a &amp;lsquo;gitea&amp;rsquo; service managing the HTTP traffic to port 3000 of the Gitea pod and a &amp;lsquo;gitea-ssh&amp;rsquo; service managing the SSH traffic to port 22 of the Gitea pod. Because we can&amp;rsquo;t use the OpenShift Router as ingress for SSH, the &amp;lsquo;gitea-ssh&amp;rsquo; service defines a special type called &lt;code&gt;NodePort&lt;/code&gt;. This means that a packet sent to this port (e.g. 30022) on any OpenShift node will be received by the corresponding service and therefore forwarded to a Gitea pod. This is the simplest way how to direct non-HTTP traffic from outside of OpenShift to an application pod and can also be used for e.g. database protocols or Java RMI. Here the corresponding resource definition for the Gitea SSH service:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;apiVersion: v1&#xA;kind: Service&#xA;metadata:&#xA;  name: gitea-ssh&#xA;spec:&#xA;  ports:&#xA;    - name: ssh&#xA;      nodePort: 30022&#xA;      port: 22&#xA;      protocol: TCP&#xA;      targetPort: 22&#xA;  selector:&#xA;    app: gitea&#xA;    deploymentconfig: gitea&#xA;  sessionAffinity: ClientIP&#xA;  type: NodePort&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;sessionAffinity: ClientIP&lt;/code&gt; setting defines &amp;ldquo;sticky sessions&amp;rdquo; to avoid distributing multiple requests of the same client to different pods. I didn&amp;rsquo;t test yet, how SSH would behave without it, but I think it generally makes sense. In a running setup the service additionally shows the discussed &lt;code&gt;ClusterIP&lt;/code&gt; which is statically assigned and the endpoints (pod IPs) which may change when pods are started and stopped:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc describe service gitea-ssh&#xA;Name:                     gitea-ssh&#xA;Namespace:                vcs&#xA;Labels:                   app=gitea&#xA;                          template=gitea-persistent-template&#xA;Annotations:&#xA;Selector:                 app=gitea,deploymentconfig=gitea&#xA;Type:                     NodePort&#xA;IP:                       172.30.8.9&#xA;Port:                     ssh  22/TCP&#xA;TargetPort:               22/TCP&#xA;NodePort:                 ssh  30022/TCP&#xA;Endpoints:                10.129.2.44:22,10.130.3.71:22&#xA;Session Affinity:         ClientIP&#xA;External Traffic Policy:  Cluster&#xA;Events:&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;From within the cluster, the Gitea SSH service can be reached via service name (extended with OpenShift project name, here &amp;lsquo;vcs&amp;rsquo;) DNS entry or directly via &lt;code&gt;ClusterIP&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ host gitea-ssh.vcs.svc&#xA;gitea-ssh.vcs.svc has address 172.30.8.9&#xA;&#xA;$ ssh git@gitea-ssh.vcs.svc&#xA;PTY allocation request failed on channel 0&#xA;Hi there, You&amp;#39;ve successfully authenticated, but Gitea does not provide shell access.&#xA;If this is unexpected, please log in with password and setup Gitea under another user.&#xA;Connection to gitea-ssh.vcs.svc closed.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;From outside the cluster, the Gitea SSH service can be reached via &lt;code&gt;NodePort&lt;/code&gt; on any OpenShift node. To avoid a dependency on a single node in the git repository URL you can define multiple DNS entries using the same name (e.g. &lt;code&gt;services.example.com&lt;/code&gt;) to all OpenShift node addresses:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ host services.example.com&#xA;services.example.com has address 10.0.0.2&#xA;services.example.com has address 10.0.0.3&#xA;&#xA;$ ssh -p 30022 git@services.example.com&#xA;PTY allocation request failed on channel 0&#xA;Hi there, You&amp;#39;ve successfully authenticated, but Gitea does not provide shell access.&#xA;If this is unexpected, please log in with password and setup Gitea under another user.&#xA;Connection to services.example.com closed.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h4 id=&#34;issues-with-nodeport&#34;&gt;Issues with NodePort&lt;/h4&gt;&#xA;&lt;p&gt;&lt;strong&gt;Port Assignment&lt;/strong&gt;&#xA;The &lt;code&gt;NodePort&lt;/code&gt; mechanism is allocating the corresponding port on each OpenShift node. To avoid a clash with node services such as the DNS resolver or the OpenShift node service the port range is restricted. It can be configured in the &lt;code&gt;/etc/origin/master/master-config.yml&lt;/code&gt; with the option &lt;a href=&#34;https://docs.okd.io/latest/architecture/core_concepts/pods_and_services.html#service-nodeport&#34;&gt;servicesNodePortRange&lt;/a&gt; and defaults to 30000-32767. Obviously multiple applications in the same cluster cannot use the same port and traffic to the chosen port must be allowed by the host firewall on the OpenShift nodes.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Node Groups&lt;/strong&gt; &lt;code&gt;NodePort&lt;/code&gt; s are always allocated on every OpenShift cluster host running the node service which also includes the OpenShift master servers. OpenShift doesn&amp;rsquo;t provide a way to restrict the involved hosts to a subset. In my example I choose to restrict the hosts receiving traffic by only adding a limited number of nodes to the service DNS entry and block access on the others via iptables. If you don&amp;rsquo;t use an application load-balancer in front of the OpenShift routers you could also re-use the wildcard DNS entry defined for the HTTP traffic. The &lt;code&gt;NodePort&lt;/code&gt; traffic would then follow the same path as the normal Web traffic.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Node Failure&lt;/strong&gt;&#xA;If one OpenShift node goes down a client trying to access the Gitea SSH service might still try to connect to the unreachable host. Fortunately, the default SSH implementation used by the git command line client is quite tolerant and simply retries with another IP address. When testing this case I therefore haven&amp;rsquo;t experienced a major issue except a slight connection delay. The failure behavior might be different for other git clients or other application protocols altogether and is definitely not ideal but simple instead.&lt;/p&gt;&#xA;&lt;p&gt;One way to improve this failure scenario would be to add a real TCP load-balancer in front of the &lt;code&gt;NodePort&lt;/code&gt; but then there would be another piece of infrastructure that must be managed synchronously with the OpenShift infrastructure and which might be a new single point of failure.&lt;/p&gt;&#xA;&lt;h2 id=&#34;container-with-root-permissions&#34;&gt;Container with root Permissions&lt;/h2&gt;&#xA;&lt;p&gt;When starting the upstream Gitea container image in OpenShift you might likely encounter a startup failure with the following error message in the log:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;s6-svscan: fatal: unable to mkfifo .s6-svscan/control: Permission denied&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The Gitea image, and many other docker images not optimized for the &lt;a href=&#34;https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/&#34;&gt;pod concept&lt;/a&gt; introduced by Kubernetes, doesn&amp;rsquo;t start a single application process but a supervisor process (in this case &lt;a href=&#34;https://skarnet.org/software/s6/overview.html&#34;&gt;s6&lt;/a&gt;) which then spawns multiple different application processes defined in &lt;a href=&#34;https://github.com/go-gitea/gitea/tree/master/docker/etc/s6&#34;&gt;/etc/s6&lt;/a&gt;. To do so it wants to create a FIFO in the &lt;code&gt;/etc/s6/.s6-svscan&lt;/code&gt; directory which is only writable by the root user which fails as by default processes are started with a random unprivileged account.&lt;/p&gt;&#xA;&lt;h4 id=&#34;security-context-constraints&#34;&gt;Security Context Constraints&lt;/h4&gt;&#xA;&lt;p&gt;Unlike docker, OpenShift controls the actions a pod can do and access with a tight set of rules called &lt;a href=&#34;https://docs.okd.io/latest/architecture/additional_concepts/authorization.html#security-context-constraints&#34;&gt;Security Context Constraints (SCC)&lt;/a&gt;. By default the &lt;a href=&#34;https://docs.okd.io/latest/dev_guide/service_accounts.html#default-service-accounts-and-roles&#34;&gt;&amp;lsquo;default&amp;rsquo; ServiceAccount&lt;/a&gt; used to run the application pods is a member of the &amp;lsquo;restricted&amp;rsquo; SCC which among other things defines the previously mentioned randomized UID. As Gitea won&amp;rsquo;t work like this, a less restrictive SCC must be used. After reading the documentation we find, that there is already a predefined SCC which grants us just enough permissions to start our container process as root user without weakening too many other restrictions. The SCC we are heading for is &amp;lsquo;anyuid&amp;rsquo;. Below I&amp;rsquo;ll present different approaches how this SCC can now be assigned to the Gitea deployment:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The OpenShift cluster administrator can add the &amp;lsquo;default&amp;rsquo; &lt;code&gt;ServiceAccount&lt;/code&gt; of a project to the list of users in the SCC definition. This doesn&amp;rsquo;t need any special configuration in the &lt;code&gt;DeploymentConfig&lt;/code&gt; of the application but also grants every deployment in the corresponding project &amp;lsquo;anyuid&amp;rsquo; privileges. In our setup this would be done with the following command, when assuming Gitea should be deployed in the &amp;lsquo;vcs&amp;rsquo; project:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc adm policy add-scc-to-user anyuid system:serviceaccount:vcs:default&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I&amp;rsquo;m not in favor of this approach as it &amp;ldquo;hides&amp;rdquo; the additional permissions in the default &lt;code&gt;ServiceAccount&lt;/code&gt; and prone to break the &lt;a href=&#34;https://en.wikipedia.org/wiki/Principle_of_least_privilege&#34;&gt;principle of least privilege&lt;/a&gt; by assigning the SCC to potentially more applications than necessary.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Another approach is using a dedicated &lt;code&gt;ServiceAccount&lt;/code&gt; for the Gitea deployment and only adding that to the &amp;lsquo;anyuid&amp;rsquo; SCC. The project owner can create a &lt;code&gt;ServiceAccount&lt;/code&gt; with:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc create serviceaccount gitea&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The cluster administrator then has to add it to the SCC as before:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc adm policy add-scc-to-user anyuid system:serviceaccount:vcs:gitea&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In the &lt;code&gt;DeploymentConfig&lt;/code&gt; the &lt;code&gt;ServiceAccount&lt;/code&gt; must be referenced with a entry under the &lt;code&gt;spec.template.spec&lt;/code&gt; key:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc patch dc/gitea --patch &amp;#39;{&amp;#34;spec&amp;#34;:{&amp;#34;template&amp;#34;:{&amp;#34;spec&amp;#34;:{&amp;#34;serviceAccountName&amp;#34;: &amp;#34;gitea&amp;#34;}}}}&amp;#39;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The dedicated &lt;code&gt;ServiceAccount&lt;/code&gt; used in this approach already hints that there might be special privileges connected to it and is in my opinion easier to audit. The disadvantage however is the more complex configuration.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Instead of adding every user account individually to the SCC a dedicated user group could be created having the SCC assigned to this group. Individual &lt;code&gt;ServiceAcccounts&lt;/code&gt; s would then be added to the group and therefore inherit the SCC. This would follow common practice in identity management to assign permissions to users via privilege groups. Additionally a group management role could be created which then would permit dedicated users not having the &amp;lsquo;cluster-admin&amp;rsquo; privilege to manage the group membership.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Unfortunately I couldn&amp;rsquo;t figure out a true self-service model where a responsible project admin could expand the necessary permissions without the possibility to interfere with other projects. In the documentation of OpenShift (&amp;lt;=3.7) I found &lt;a href=&#34;https://docs.openshift.com/container-platform/3.7/dev_guide/service_accounts.html#managed-service-accounts&#34;&gt;a hint&lt;/a&gt; that it is/was(?) possible to extend the default &lt;code&gt;ServiceAccount&lt;/code&gt; s available after creating a new project by adding the account name (e.g. &amp;lsquo;anyuid-service-account&amp;rsquo;) to the &lt;code&gt;serviceAccountConfig.managedNames&lt;/code&gt; list in &lt;code&gt;/etc/origin/master/master-config.yml&lt;/code&gt;. While this configuration is still present in newer &lt;code&gt;master-config.yml&lt;/code&gt;, the documentation is gone and I also didn&amp;rsquo;t find a way how to automatically add a user created like this to the &amp;lsquo;anyuid&amp;rsquo; SCC. Maybe it&amp;rsquo;s possible by somehow modifying the project template. If you have done this before or at least have an idea how this could be done, please drop me a line.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;At the end, the way how the &amp;lsquo;anyuid&amp;rsquo; SCC is assigned to the Gitea application is unimportant as long as the application pod is allowed to start the s6 supervisor process with root permissions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;gitea-application-template&#34;&gt;Gitea Application Template&lt;/h2&gt;&#xA;&lt;p&gt;The way how OpenShift administrators can provide an application setup ready for instantiation by OpenShift project owners is through &lt;a href=&#34;https://docs.okd.io/latest/dev_guide/templates.html#dev-guide-templates&#34;&gt;Templates&lt;/a&gt;. Inspired by the &lt;a href=&#34;https://dev.to/livioribeiro/my-journey-through-openshift-13f2&#34;&gt;My journey through Openshift&lt;/a&gt; blog post, I wanted to create my own Gitea template fixing some issues found in the original template and extending it with the opinionated configuration presented above. You can download it from &lt;a href=&#34;https://github.com/ganto/openshift-templates/blob/master/apps/gitea-persistent-template.yaml&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The template is able to automatically setup Gitea with exception of the &amp;lsquo;anyuid&amp;rsquo; SCC configuration. It requires a persistent volume (PV) for storing the git repositories and some static configurations such as the SSH authorized_keys file. By default it will use a SQLite database backend which is also stored in the PV. Optionally you can also give the connection string and credentials of a PostgreSQL or MariaDB backend which can run on OpenShift or externally.&lt;/p&gt;&#xA;&lt;p&gt;If you want the template to be available in the &lt;a href=&#34;https://docs.okd.io/latest/architecture/service_catalog/index.html&#34;&gt;Service Catalog&lt;/a&gt; the YAML file has to be applied to the &amp;lsquo;openshift&amp;rsquo; project by a cluster administrator:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc create -f gitea-persistent-template.yaml -n openshift&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Afterwards it can be instantiated by any project admin via Service Catalog Web-UI or from the command line via:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc new-project vcs&#xA;$ oc new-app --template=gitea-persistent -p HTTP_DOMAIN=git.example.com -p SSH_DOMAIN=services.example.com&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Alternatively, if no Service Catalog is available, or the template shouldn&amp;rsquo;t be loaded to OpenShift, the application can also be created directly from the YAML file via:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc new-app -f gitea-persistent-template.yaml -p HTTP_DOMAIN=git.example.com -p SSH_DOMAIN=services.example.com&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;IMPORTANT:&lt;/strong&gt; The template will configure Gitea to use a &lt;code&gt;ServiceAccount&lt;/code&gt; named according to the parameter &lt;code&gt;APPLICATION_NAME&lt;/code&gt; (defaults to &amp;lsquo;gitea&amp;rsquo;). It must be added to the &amp;lsquo;anyuid&amp;rsquo; SCC as described above. E.g.:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ oc adm policy add-scc-to-user anyuid system:serviceaccount:vcs:gitea&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you have some feedback regarding the template or troubles using it, please open a &lt;a href=&#34;https://github.com/ganto/openshift-templates/issues&#34;&gt;Github issue&lt;/a&gt;. Comments, corrections or general feedback to my article can be posted below. Thanks for reading.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>spectre-meltdown-checker in Fedora and EPEL repositories</title>
      <link>https://blog.linuxmonk.ch/2018/spectre-meltdown-checker-in-fedora-and-epel-repositories/</link>
      <pubDate>Thu, 15 Feb 2018 22:14:27 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2018/spectre-meltdown-checker-in-fedora-and-epel-repositories/</guid>
      <description>&lt;p&gt;The recently disclosed &lt;a href=&#34;https://spectreattack.com/&#34;&gt;Spectre and Meltdown&lt;/a&gt; CPU vulnerabilities are some of the most dramatic security issues in the recent computer history. Fortunately even six weeks after public disclosure sophisticated attacks exploiting these vulnerabilities are &lt;a href=&#34;https://blog.fortinet.com/2018/01/30/the-exponential-growth-of-detected-malware-targeted-at-meltdown-and-spectre&#34;&gt;not yet common to observe&lt;/a&gt;. Fortunately, because the hard- and software vendors are still stuggling to provide appropriate fixes.&lt;/p&gt;&#xA;&lt;p&gt;If you happen to run a Linux system, an excellent tool for tracking your vulnerability as well as the already active mitigation strategies is the &lt;a href=&#34;https://github.com/speed47/spectre-meltdown-checker&#34;&gt;spectre-meltdown-checker&lt;/a&gt; script originally written and maintained by &lt;a href=&#34;https://twitter.com/speedux&#34;&gt;Stéphane Lesimple&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Within the last month I set myself the target to bring this script to Fedora and EPEL so it can be easily consumed by the Fedora, CentOS and RHEL users. Today it finally happend that the &lt;code&gt;spectre-meltdown-checker&lt;/code&gt; package was added to the EPEL repositories after it is already available in the Fedora stable repositories since one week.&lt;/p&gt;&#xA;&lt;p&gt;On Fedora, all you need to do is:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;dnf install spectre-meltdown-checker&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After &lt;a href=&#34;https://fedoraproject.org/wiki/EPEL#How_can_I_use_these_extra_packages.3F&#34;&gt;enabling the EPEL repository&lt;/a&gt; on CentOS this would be:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;yum install spectre-meltdown-checker&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The script, which should be run by the &lt;code&gt;root&lt;/code&gt; user, will report:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;If your processor is affected by the different variants of the Spectre and Meltdown vulnerabilities.&lt;/li&gt;&#xA;&lt;li&gt;If your processor microcode tries to mitigate the Spectre vulnerability or if you run a microcode which&#xA;is known to &lt;a href=&#34;https://newsroom.intel.com/news/intel-security-issue-update-addressing-reboot-issues/&#34;&gt;cause stability issues&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;If your kernel implements the currently known mitigation strategies and if it was compiled with a compiler which is hardening it even more.&lt;/li&gt;&#xA;&lt;li&gt;And eventually if you&amp;rsquo;re (still) affected by some of the vulnerability variants.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;On my laptop this currently looks like this (Note, that I&amp;rsquo;m not running the latest stable Fedora kernel yet):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# spectre-meltdown-checker&#xA;Spectre and Meltdown mitigation detection tool v0.33&#xA;&#xA;Checking for vulnerabilities on current system&#xA;Kernel is Linux 4.14.14-200.fc26.x86_64 #1 SMP Fri Jan 19 13:27:06 UTC 2018 x86_64&#xA;CPU is Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz&#xA;&#xA;Hardware check&#xA;* Hardware support (CPU microcode) for mitigation techniques&#xA;  * Indirect Branch Restricted Speculation (IBRS)&#xA;    * SPEC_CTRL MSR is available:  YES&#xA;    * CPU indicates IBRS capability:  YES  (SPEC_CTRL feature bit)&#xA;  * Indirect Branch Prediction Barrier (IBPB)&#xA;    * PRED_CMD MSR is available:  YES&#xA;    * CPU indicates IBPB capability:  YES  (SPEC_CTRL feature bit)&#xA;  * Single Thread Indirect Branch Predictors (STIBP)&#xA;    * SPEC_CTRL MSR is available:  YES&#xA;    * CPU indicates STIBP capability:  YES&#xA;  * Enhanced IBRS (IBRS_ALL)&#xA;    * CPU indicates ARCH_CAPABILITIES MSR availability:  NO&#xA;    * ARCH_CAPABILITIES MSR advertises IBRS_ALL capability:  NO&#xA;  * CPU explicitly indicates not being vulnerable to Meltdown (RDCL_NO):  UNKNOWN&#xA;  * CPU microcode is known to cause stability problems:  YES  (Intel CPU Family 6 Model 61 Stepping 4 with microcode 0x28)&#xA;&#xA;The microcode your CPU is running on is known to cause instability problems,&#xA;such as intempestive reboots or random crashes.&#xA;You are advised to either revert to a previous microcode version (that might not have&#xA;the mitigations for Spectre), or upgrade to a newer one if available.&#xA;&#xA;* CPU vulnerability to the three speculative execution attacks variants&#xA;  * Vulnerable to Variant 1:  YES&#xA;  * Vulnerable to Variant 2:  YES&#xA;  * Vulnerable to Variant 3:  YES&#xA;&#xA;CVE-2017-5753 [bounds check bypass] aka &amp;#39;Spectre Variant 1&amp;#39;&#xA;* Mitigated according to the /sys interface:  NO  (kernel confirms your system is vulnerable)&#xA;&amp;gt; STATUS:  VULNERABLE  (Vulnerable)&#xA;&#xA;CVE-2017-5715 [branch target injection] aka &amp;#39;Spectre Variant 2&amp;#39;&#xA;* Mitigated according to the /sys interface:  YES  (kernel confirms that the mitigation is active)&#xA;* Mitigation 1&#xA;  * Kernel is compiled with IBRS/IBPB support:  NO&#xA;  * Currently enabled features&#xA;    * IBRS enabled for Kernel space:  NO&#xA;    * IBRS enabled for User space:  NO&#xA;    * IBPB enabled:  NO&#xA;* Mitigation 2&#xA;  * Kernel compiled with retpoline option:  YES&#xA;  * Kernel compiled with a retpoline-aware compiler:  YES  (kernel reports full retpoline compilation)&#xA;  * Retpoline enabled:  YES&#xA;&amp;gt; STATUS:  NOT VULNERABLE  (Mitigation: Full generic retpoline)&#xA;&#xA;CVE-2017-5754 [rogue data cache load] aka &amp;#39;Meltdown&amp;#39; aka &amp;#39;Variant 3&amp;#39;&#xA;* Mitigated according to the /sys interface:  YES  (kernel confirms that the mitigation is active)&#xA;* Kernel supports Page Table Isolation (PTI):  YES&#xA;* PTI enabled and active:  YES&#xA;* Running as a Xen PV DomU:  NO&#xA;&amp;gt; STATUS:  NOT VULNERABLE  (Mitigation: PTI)&#xA;&#xA;A false sense of security is worse than no security at all, see --disclaimer&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The script also supports a mode which outputs the result as JSON, so that it can easily be parsed by any compliance or monitoring tool:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# spectre-meltdown-checker --batch json 2&amp;gt;/dev/null | jq&#xA;[&#xA;  {&#xA;    &amp;#34;NAME&amp;#34;: &amp;#34;SPECTRE VARIANT 1&amp;#34;,&#xA;    &amp;#34;CVE&amp;#34;: &amp;#34;CVE-2017-5753&amp;#34;,&#xA;    &amp;#34;VULNERABLE&amp;#34;: true,&#xA;    &amp;#34;INFOS&amp;#34;: &amp;#34;Vulnerable&amp;#34;&#xA;  },&#xA;  {&#xA;    &amp;#34;NAME&amp;#34;: &amp;#34;SPECTRE VARIANT 2&amp;#34;,&#xA;    &amp;#34;CVE&amp;#34;: &amp;#34;CVE-2017-5715&amp;#34;,&#xA;    &amp;#34;VULNERABLE&amp;#34;: false,&#xA;    &amp;#34;INFOS&amp;#34;: &amp;#34;Mitigation: Full generic retpoline&amp;#34;&#xA;  },&#xA;  {&#xA;    &amp;#34;NAME&amp;#34;: &amp;#34;MELTDOWN&amp;#34;,&#xA;    &amp;#34;CVE&amp;#34;: &amp;#34;CVE-2017-5754&amp;#34;,&#xA;    &amp;#34;VULNERABLE&amp;#34;: false,&#xA;    &amp;#34;INFOS&amp;#34;: &amp;#34;Mitigation: PTI&amp;#34;&#xA;  }&#xA;]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For those who are (still) using a Nagios-compatible monitoring system, &lt;code&gt;spectre-meltdown-checker&lt;/code&gt; also supports to be run as &lt;a href=&#34;https://exchange.nagios.org/directory/Addons/Monitoring-Agents/NRPE--2D-Nagios-Remote-Plugin-Executor/details&#34;&gt;NRPE&lt;/a&gt; check:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# spectre-meltdown-checker --batch nrpe 2&amp;gt;/dev/null ; echo $?&#xA;Vulnerable: CVE-2017-5753&#xA;2&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I just mailed to Stéphane and he will soon release version 0.35 with many new features and fixes. As soon as it will be released I&amp;rsquo;ll submit a package update, so that you&amp;rsquo;re always up to date with the latest developments.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Getting started with LXD on Fedora</title>
      <link>https://blog.linuxmonk.ch/2016/getting-started-with-lxd-on-fedora/</link>
      <pubDate>Tue, 20 Dec 2016 18:30:01 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2016/getting-started-with-lxd-on-fedora/</guid>
      <description>&lt;p&gt;Since a long time I&amp;rsquo;m using and following the development of the &lt;a href=&#34;https://linuxcontainers.org/lxc/&#34;&gt;LXC&lt;/a&gt; (Linux Container) project. I feel that it unfortunately never really had the success it deserved and in the recent years new technologies such as &lt;a href=&#34;https://www.docker.com/&#34;&gt;Docker&lt;/a&gt; and &lt;a href=&#34;https://coreos.com/rkt/&#34;&gt;rkt&lt;/a&gt; pretty much redefined the common understanding of a container according to their own terms. Nonetheless LXC still claims its niche as full Linux operating system container solution especially suited for persistent &lt;a href=&#34;http://rhelblog.redhat.com/2016/09/01/in-defense-of-the-pet-container-part-3-puppies-kittens-and-containers/&#34;&gt;pet containers&lt;/a&gt;, an area where the new players on the market are still in the &lt;a href=&#34;http://blog.kubernetes.io/2016/12/kubernetes-1.5-supporting-production-workloads.html&#34;&gt;stage of figuring out&lt;/a&gt; how to implement this properly according to their concept. LXC development hasn&amp;rsquo;t stalled, quite the contrary, they extended the API with a HTTP REST interface (served via Linux Container Daemon, &lt;a href=&#34;https://linuxcontainers.org/lxd&#34;&gt;LXD&lt;/a&gt;), implemented support for &lt;a href=&#34;http://tycho.ws/blog/2015/04/lxd-live-migration.html&#34;&gt;container live-migration&lt;/a&gt;, added container &lt;a href=&#34;https://insights.ubuntu.com/2016/04/01/lxd-2-0-image-management-512/&#34;&gt;image management&lt;/a&gt; and much more. This means that there are a lot of reasons why someone, including me, would want to use Linux containers and LXD.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Enable LXD COPR repository&lt;/strong&gt;&#xA;LXD is not officially packaged for Fedora. Therefore I spent the last few weeks by creating some community packages via their &lt;a href=&#34;https://copr.fedorainfracloud.org&#34;&gt;COPR&lt;/a&gt; build system and repository service. Similar to the better known Ubuntu &lt;a href=&#34;https://help.ubuntu.com/community/PPA&#34;&gt;PPA&lt;/a&gt; (Personal Package Archive) system, COPR provides a RPM package repository which can easily be consumed by Fedora users. To use the &lt;a href=&#34;https://copr.fedorainfracloud.org/coprs/ganto/lxd/&#34;&gt;LXD repository&lt;/a&gt;, all you need to do is enabling it via &lt;code&gt;dnf&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# dnf copr enable ganto/lxd&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Please note that COPR packages are not reviewed by the Fedora package maintainers therefore you should only install packages where you trust the author. For this reason I also provide a &lt;a href=&#34;https://github.com/ganto/copr-lxd&#34;&gt;Github repository&lt;/a&gt; with the RPM spec files, so that everyone could also build the RPMs on their own if they feel uncomfortable using the pre-built RPMs from the repository.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Install and start LXD&lt;/strong&gt;&#xA;LXD is split into multiple packages. The important ones are &lt;code&gt;lxd&lt;/code&gt;, the Linux Container Daemon and &lt;code&gt;lxd-client&lt;/code&gt;, the LXD client binary called &lt;code&gt;lxc&lt;/code&gt;. Install them with:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# dnf install lxd lxd-client&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Unfortunately I didn&amp;rsquo;t had time to figure out the correct SELinux labels for LXD yet, therefore you need to &lt;a href=&#34;https://fedoraproject.org/wiki/SELinux_FAQ?rd=SELinux/FAQ#How_do_I_enable_or_disable_SELinux_.3F&#34;&gt;disable SELinux&lt;/a&gt; prior to starting the daemon. LXD supports &lt;a href=&#34;http://man7.org/linux/man-pages/man7/user_namespaces.7.html&#34;&gt;user namespaces&lt;/a&gt; to map the root user in a container to an unprivileged user ID on the container host. For this you need to assign an UID range on the host:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# echo &amp;#34;root:1000000:65536&amp;#34; &amp;gt;&amp;gt; /etc/subuid&#xA;# echo &amp;#34;root:1000000:65536&amp;#34; &amp;gt;&amp;gt; /etc/subgid&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you don&amp;rsquo;t do this, user namespaces won&amp;rsquo;t be used which is indicated by a message such as:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;lvl=warn msg=&amp;#34;Error reading idmap&amp;#34; err=&amp;#34;User \&amp;#34;root\&amp;#34; has no subuids.&amp;#34;&#xA;lvl=warn msg=&amp;#34;Only privileged containers will be able to run&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Eventually start LXD with:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# systemctl start lxd.service&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;LXD configuration&lt;/strong&gt;&#xA;LXD doesn&amp;rsquo;t have a configuration file. Configuration properties must be set and retrieved via client commands. &lt;a href=&#34;https://github.com/lxc/lxd/blob/master/doc/configuration.md&#34;&gt;Here&lt;/a&gt; you can find a list of all supported configuration properties. Most tutorials will suggest to initially run &lt;code&gt;lxd init&lt;/code&gt; which would generate a basic configuration. However there is only a limited set of configuration options available via this command and therefore I prefer to set the properties via LXD client. A normal user account can be used to manage LXD via client when it&amp;rsquo;s a member of the &lt;code&gt;lxd&lt;/code&gt; POSIX group:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# usermod --append --groups lxd myuser&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;By default LXD will store its images and containers in directories under &lt;em&gt;/var/lib/lxd&lt;/em&gt;. Alternatives storage back-ends such as &lt;a href=&#34;https://en.wikipedia.org/wiki/Logical_Volume_Manager_%28Linux%29&#34;&gt;LVM&lt;/a&gt;, &lt;a href=&#34;https://btrfs.wiki.kernel.org&#34;&gt;Btrfs&lt;/a&gt; or &lt;a href=&#34;https://en.wikipedia.org/wiki/ZFS&#34;&gt;ZFS&lt;/a&gt; are available. Here I will show an example how to use LVM. Similar to the &lt;a href=&#34;http://www.projectatomic.io/blog/2015/06/notes-on-fedora-centos-and-docker-storage-drivers/&#34;&gt;recommended Docker setup&lt;/a&gt; on Fedora it will use LVM thin volumes to store images and containers. First create a LVM thin pool. For this we still need some space available on the default volume group. Alternatively you can use a second disk with a dedicated volume group. Replace &lt;code&gt;vg00&lt;/code&gt; with the volume group name you want to use:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# lvcreate --size 20G --type thin-pool --name lxd-pool vg00&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now we set this thin pool as storage back-end in LXD:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ lxc config set storage.lvm_vg_name vg00&#xA;$ lxc config set storage.lvm_thinpool_name lxd-pool&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For each image which is downloaded LXD will create a thin volume storing the image. If a new container is instantiated a new writeable snapshot will be created from which you can create an image again or make further snapshots for fast roll-back. By default the container file system will be ext4. If you prefer &lt;a href=&#34;http://oss.sgi.com/projects/xfs/&#34;&gt;XFS&lt;/a&gt;, it can be set with the following command:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ lxc config set storage.lvm_fstype xfs&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Also for networking various options are available. If you ran &lt;code&gt;lxd init&lt;/code&gt;, you may have already created a &lt;code&gt;lxdbr0&lt;/code&gt; network bridge. Otherwise I will show you how to manually create one in case you want a dedicated container bridge or attach LXD to an already existing bridge which would be configured through an external DHCP server.&lt;/p&gt;&#xA;&lt;p&gt;To create a dedicated network bridge where the traffic will be &lt;a href=&#34;https://en.wikipedia.org/wiki/Network_address_translation&#34;&gt;NAT&lt;/a&gt;&amp;rsquo;ed to the outside, run:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ lxc network create lxdbr0&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will create a bridge device with the given name and also start-up a dedicated instance of &lt;a href=&#34;http://www.thekelleys.org.uk/dnsmasq/doc.html&#34;&gt;dnsmasq&lt;/a&gt; which will act as DNS and DHCP server for the container network.&lt;/p&gt;&#xA;&lt;p&gt;A big advantage of LXD in comparison to plain LXC is a feature called container profiles. There you can define settings which should be applied to a new container instance. In our case, we now want containers to use the network bridge created before or any other network bridge which was created independently. For this it will be added to the &amp;ldquo;default&amp;rdquo; profile which is applied by default when creating a new container:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ lxc network attach-profile lxdbr0 default eth0&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;eth0&lt;/code&gt; is the network device name which will be used inside the container. We could also add multiple network bridges or create multiple profiles ( &lt;code&gt;lxc profile create newprofile&lt;/code&gt;) with different network settings.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Create a container&lt;/strong&gt;&#xA;Finally we have the most important pieces together to launch a container. A container is always instantiated from an image. The LXC projects provides an image repository with a big number of prebuilt container images pre-configured under the remote name &lt;code&gt;images:&lt;/code&gt;. The images are regular LXC containers created via upstream &lt;code&gt;lxc-create&lt;/code&gt; script using the various distribution templates. To list the available images run:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ lxc image list images:&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you found an image you want to run, it can be started as following. Of course in my example I will use a Fedora 24 container (unfortunately there are no Fedora 25 containers available yet, but I&amp;rsquo;m also &lt;a href=&#34;https://github.com/lxc/lxc/issues/1356&#34;&gt;working on that&lt;/a&gt;):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ lxc launch images:fedora/24 my-fedora-container&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;With the following command you can create a console session into the container:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ lxc exec my-fedora-container /bin/bash&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I hope this short guide made you curious to try LXD on Fedora. I&amp;rsquo;m glad to hear some feedback via comments or &lt;a href=&#34;https://blog.linuxmonk.ch/about/&#34;&gt;Email&lt;/a&gt; if you find this guide or the my &lt;a href=&#34;https://copr.fedorainfracloud.org/coprs/ganto/lxd/&#34;&gt;COPR repository&lt;/a&gt; useful or if you have some corrections or found some issues.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Further reading&lt;/strong&gt;&#xA;If you want to know more about how to use the individual features of LXD, I can recommend the how-to series of Stéphane Graber, one of the core developers of LXC/LXD:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/&#34;&gt;LXD 2.0: Your first LXD container&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/03/26/lxd-2-0-resource-control-412/&#34;&gt;LXD 2.0: Resource control&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/03/30/lxd-2-0-image-management-512/&#34;&gt;LXD 2.0: Image management&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/04/12/lxd-2-0-remote-hosts-and-container-migration-612/&#34;&gt;LXD 2.0: Remote hosts and container migration&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/04/13/lxd-2-0-docker-in-lxd-712/&#34;&gt;LXD 2.0: Docker in LXD&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/04/14/lxd-2-0-lxd-in-lxd-812/&#34;&gt;LXD 2.0: LXD in LXD&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/04/25/lxd-2-0-live-migration-912/&#34;&gt;LXD 2.0: Live migration&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/10/26/lxd-2-0-lxd-and-openstack-1112/&#34;&gt;LXD 2.0: LXD and OpenStack&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/04/18/lxd-api-direct-interaction/&#34;&gt;Directly interacting with the LXD API&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/10/27/network-management-with-lxd-2-3/&#34;&gt;Network management with LXD (2.3+)&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.stgraber.org/2016/12/07/running-snaps-in-lxd-containers/&#34;&gt;Running snaps in LXD containers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Managing DNS zones with Ansible</title>
      <link>https://blog.linuxmonk.ch/2016/managing-dns-zones-with-ansible/</link>
      <pubDate>Fri, 23 Sep 2016 16:44:04 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2016/managing-dns-zones-with-ansible/</guid>
      <description>&lt;p&gt;Currently, I&amp;rsquo;m working on automating the setup of a authoritative DNS server, namely &lt;a href=&#34;http://gdnsd.org/&#34;&gt;gdnsd&lt;/a&gt;. There are many nice features in &lt;code&gt;gdnsd&lt;/code&gt;, but what might be interesting for you, that it requires the zone data to be in the regular &lt;a href=&#34;https://www.ietf.org/rfc/rfc1035.txt&#34;&gt;RFC1035&lt;/a&gt; compliant format. This is also true for &lt;a href=&#34;https://www.isc.org/downloads/bind/&#34;&gt;bind&lt;/a&gt;, probably the most widely used DNS server, therefore the approach explained here, could be also used for &lt;code&gt;bind&lt;/code&gt;. Again I wanted to use &lt;a href=&#34;https://www.ansible.com/&#34;&gt;Ansible&lt;/a&gt; as automation framework, not only to setup and configure the service, but also to generate the DNS zone file. One reason for this is, because &lt;code&gt;gdnsd&lt;/code&gt; doesn&amp;rsquo;t support zone transfers, therefore Ansible should be used as synchronization mechanism and because in my opinion the JSON-based inventory format is a simple, generic but very powerful data interface. Especially when considering the &lt;a href=&#34;https://docs.ansible.com/ansible/intro_dynamic_inventory.html&#34;&gt;dynamic inventory&lt;/a&gt; feature of Ansible, one is completely free where and how to actually store the configuration data.&lt;/p&gt;&#xA;&lt;p&gt;There are already a number of Ansible &lt;a href=&#34;https://galaxy.ansible.com/list#/roles?page=1&amp;amp;page_size=10&amp;amp;autocomplete=bind&#34;&gt;bind roles&lt;/a&gt; available, however they mostly use a very simple approach when it&amp;rsquo;s about configuring the zone file and its serial. When generating zone files with an automation tool the trickiest part is the handling of the serial number, which has to be increased on every zone update. I&amp;rsquo;d like to explain what solutions I implemented to solve this challenge.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Zone data generation must be idempotent&lt;/strong&gt;&#xA;One strength of Ansible is, that it can be run over and over again and only ever changes something in the system if the current state is not as desired. In my context this means, that the zone file only needs to be updated if the zone data from the inventory has changed. Therefore, also the serial number only ever has to be updated in that case. But how to know if the data has changed?&lt;/p&gt;&#xA;&lt;p&gt;Using the powerful &lt;a href=&#34;http://jinja.pocoo.org/&#34;&gt;Jinja2&lt;/a&gt; templating engine, I defined dictionary and assigned every value which would later go into the zone file. Then, I&amp;rsquo;ll create a checksum over the dictionary content and save it as comment into the zone file. If the checksum changed, the serial has to be updated. Otherwise the zone file includes the old serial and nothing changed. In practice this would look like this:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Read the hash and serial which are saved as comment in the existing zone file and register a temporary variable. It will be empty if the zone file doesn&amp;rsquo;t exist yet:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;- name: Read zone hash and serial&#xA;  shell: &amp;#39;grep &amp;#34;^; Hash:&amp;#34; /etc/gdnsd/zones/example.com || true&amp;#39;&#xA;  register: gdnsd__register_hash_and_serial&#xA;  [...]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Define a task which will update the zone file:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;- name: Generate forward zones&#xA;  template:&#xA;    src: &amp;#39;etc/gdnsd/zones/forward_zone.j2&amp;#39;&#xA;    dest: &amp;#39;/etc/gdnsd/zones/example.com&amp;#39;&#xA;    [...]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;In the template, create a dictionary holding the zone data:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{% set _zone_data = {} %}&#xA;{% set _ = _zone_data.update({&amp;#39;ttl&amp;#39;: item.ttl}) %}&#xA;{% set _ = _zone_data.update({&amp;#39;domain&amp;#39;: &amp;#39;example.com&amp;#39;}) %}&#xA;[...]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Create an intermediate variable &lt;code&gt;_hash_and_serial&lt;/code&gt; holding the hash and serial read from the zone file before:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{% set _hash_and_serial = gdnsd__register_hash_and_serial.stdout.split(&amp;#39; &amp;#39;)[2:] %}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Create a hash from the final &lt;code&gt;_zone_data&lt;/code&gt; dictionary, compare it with the hash (first element) in &lt;code&gt;_hash_and_serial&lt;/code&gt;. If the hashes are equal set the serial as read before (second element) in &lt;code&gt;_hash_and_serial&lt;/code&gt;. Otherwise set a new serial which was previously saved in &lt;code&gt;gdnsd__fact_zone_serial&lt;/code&gt; (see following section):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{% set _zone = {&amp;#39;hash&amp;#39;: _zone_data | string | hash(&amp;#39;md5&amp;#39;)} %}&#xA;{% if _hash_and_serial and _hash_and_serial[0] == _zone[&amp;#39;hash&amp;#39;] %}&#xA;{%   set _ = _zone.update({&amp;#39;serial&amp;#39;: _hash_and_serial[1]}) %}&#xA;{% else %}&#xA;{%   set _ = _zone.update({&amp;#39;serial&amp;#39;: gdnsd__fact_zone_serial}) %}&#xA;{% endif %}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Safe the final hash and serial as comment to the zone file:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;; Hash: {{ _zone[&amp;#39;hash&amp;#39;] }} {{ _zone[&amp;#39;serial&amp;#39;] }}&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;strong&gt;Identical zone serial on distributed servers&lt;/strong&gt;&#xA;I didn&amp;rsquo;t explain yet, how &lt;code&gt;gdnsd__fact_zone_serial&lt;/code&gt; is defined. Initially, I simply had &lt;code&gt;ansible_date_time.epoch&lt;/code&gt;, which corresponds the &lt;a href=&#34;https://en.wikipedia.org/wiki/Unix_time&#34;&gt;Unix time&lt;/a&gt;, assigned to the serial. This is the simplest way to make sure the serial is numerical and each zone update results in an increased value. However, in the introduction I also mentioned the issue of distributing the zone files between a set of DNS servers. Obviously, if they have the same zone data, they must also have the same serial.&lt;/p&gt;&#xA;&lt;p&gt;To make sure multiple servers are using the same serial for a zone update, the serial is not computed individually in each template task execution, but once for each playbook run. In Ansible, one can specify that a task must only run once, even the playbook is executed on multiple servers. Therefore I defined such a task to store the Unix time in the temporary fact &lt;code&gt;gdnsd__fact_zone_serial&lt;/code&gt; which is used in the zone template on all servers:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;- name: Generate serial&#xA;  set_fact:&#xA;    gdnsd__fact_zone_serial: &amp;#39;{{ ansible_date_time.epoch }}&amp;#39;&#xA;  run_once: True&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This approach is still not perfect. It won&amp;rsquo;t compare the two generated zone files between a set of servers. So you have to make sure that the zone data in the inventory is the same for all servers. Also, if you update the servers individually, the serial is generated twice and therefore are different, even when the zone data is identical. At the moment I can&amp;rsquo;t see any elegant approach to solve those issues. If you have some ideas, please let me know&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;The example code listed above is a simplified version of my real code. If you are interested in the entire role, have a look at &lt;a href=&#34;https://github.com/ganto/ansible-gdnsd&#34;&gt;github.com: ganto/ansible-gdnsd&lt;/a&gt;. I hope this could give you some useful examples for using some of the more advanced Ansible features in a real-world scenario.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>&#34;Let&#39;s encrypt&#34; with acme-tiny</title>
      <link>https://blog.linuxmonk.ch/2016/lets-encrypt-with-acme-tiny/</link>
      <pubDate>Mon, 05 Sep 2016 18:47:29 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2016/lets-encrypt-with-acme-tiny/</guid>
      <description>&lt;p&gt;Most of my readers must have heard about the &lt;a href=&#34;https://letsencrypt.org&#34;&gt;&amp;ldquo;Let&amp;rsquo;s encrypt&amp;rdquo;&lt;/a&gt; public certificate authority (CA) by now. For those who haven&amp;rsquo;t: About two years ago, the Internet Security Research Group (ISRG), a public benefit group, supported by the &lt;a href=&#34;https://www.eff.org/&#34;&gt;Electronic Frontier Foundation&lt;/a&gt; (EFF), the &lt;a href=&#34;https://www.mozilla.org&#34;&gt;Mozilla Foundation&lt;/a&gt;, Cisco, &lt;a href=&#34;https://www.akamai.com&#34;&gt;Akamai&lt;/a&gt;, the &lt;a href=&#34;https://www.linuxfoundation.org/&#34;&gt;Linux Foundation&lt;/a&gt; and many more started the challenge to create a fully trusted public key infrastructure which can be used for free by everyone. Until then, the big commercial certificate authorities such as Comodo, Symantec, GlobalSign or GoDaddy dominated the market of SSL certificates which prevented a wide use of trusted encryption. The major goal of the ISRG is to increase the use of HTTPS for Web sites from then less than 40 percent two years ago to &lt;a href=&#34;https://letsencrypt.org/2014/11/18/announcing-lets-encrypt.html&#34;&gt;a 100 percent&lt;/a&gt;. One step to achieve this, is by providing certificates to everyone for free and the other step, to do this in a fully automated way. For this reason a new protocol called &lt;a href=&#34;https://tools.ietf.org/html/draft-ietf-acme-acme-03&#34;&gt;Advanced Certificate Management Environment&lt;/a&gt; (ACME) was designed and implemented. Going forward to today: The &amp;ldquo;Let&amp;rsquo;s encrypt&amp;rdquo; CA issued already more than five million certificates and the use of HTTPS is increasing to around 45 percent in June 2016.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/diafygi/acme-tiny&#34;&gt;acme-tiny&lt;/a&gt; is a small Python script which can be used to submit the certificate request to the &amp;ldquo;Let&amp;rsquo;s encrypt&amp;rdquo; CA. If you&amp;rsquo;re eligible to request a certificate for this domain you instantly get the certificate back. As such a certificate is only valid for 90 days and the renewal process doesn&amp;rsquo;t need any user interaction it&amp;rsquo;s a perfect opportunity for a fully automated setup.&lt;/p&gt;&#xA;&lt;p&gt;Since a while I prefer &lt;a href=&#34;https://ansible.com&#34;&gt;Ansible&lt;/a&gt; for all kind of automation tasks. &amp;ldquo;Let&amp;rsquo;s encrypt&amp;rdquo; finally allows me to secure new services, which I spontaneously decide to host on my server via sub-domains. To ease the initial setup and fully automate the renewal process, I wrote an Ansible role &lt;a href=&#34;https://galaxy.ansible.com/ganto/acme_tiny/&#34;&gt;ganto.acme_tiny&lt;/a&gt;. It will run the following tasks:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Generate a new RSA key if none is found for this domain&lt;/li&gt;&#xA;&lt;li&gt;Create a certificate signing request&lt;/li&gt;&#xA;&lt;li&gt;Submit the certificate signing request with help of &lt;code&gt;acme-tiny&lt;/code&gt; to the &amp;ldquo;Let&amp;rsquo;s encrypt&amp;rdquo; CA&lt;/li&gt;&#xA;&lt;li&gt;Merge the received certificate with the issuing CA certificate to a certificate chain which then can be configured for various services&lt;/li&gt;&#xA;&lt;li&gt;Restart the affected service to load the new certificate&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;In practice, this would look like this:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Create a role variable file &lt;em&gt;/etc/ansible/vars/mail.linuxmonk.ch.yml&lt;/em&gt;: &lt;code&gt;acme_tiny__domain: [ &#39;mail.linuxmonk.ch&#39;, &#39;smtp.linuxmonk.ch&#39; ] acme_tiny__cert_type: [ &#39;postfix&#39;, &#39;dovecot&#39; ]&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Make sure the involved service configurations load the certificate and key from the correct location (see &lt;a href=&#34;https://gantoacme-tiny.readthedocs.io/en/latest/system-configuration.html#service-configuration&#34;&gt;ganto.acme_tiny: Service Configuration&lt;/a&gt;).&lt;/li&gt;&#xA;&lt;li&gt;Run the playbook with the root user to do the initial setup:&#xA;&lt;code&gt;$ sudo ansible-playbook \ -e @/etc/ansible/vars/mail.linuxmonk.ch.yml \ /etc/ansible/playbooks/acme_tiny.yml&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;That&amp;rsquo;s it. Both SMTP and IMAP are now secured with help of a &amp;ldquo;Let&amp;rsquo;s encrypt&amp;rdquo; certificate. To setup automated certificate renewal I only have to add the executed command in a task scheduler such as &lt;code&gt;cron&lt;/code&gt; from where it will be executed as unprivileged user &lt;code&gt;acmetiny&lt;/code&gt; which was created during the initial playbook run. E.g. in &lt;em&gt;/etc/cron.d/acme_tiny&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin&#xA;&#xA;@monthly acmetiny /usr/bin/ansible-playbook -e @/etc/ansible/vars/mail.linuxmonk.ch.yml /etc/ansible/playbooks/acme_tiny.yml &amp;gt;/dev/null&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you became curious and want to have a setup like this yourself, checkout the extensive documentation about the Ansible role at &lt;a href=&#34;https://gantoacme-tiny.readthedocs.io/en/latest/index.html&#34;&gt;Read the Docs: ganto.acme_tiny&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This small project was also a good opportunity for me, to integrate all the nice free software-as-a-service offers the Internet is providing for a (Ansible role) developer nowadays:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The code &amp;ldquo;project&amp;rdquo; is hosted and managed on &lt;a href=&#34;https://github.com/ganto/ansible-acme_tiny&#34;&gt;Github&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Every release and pull request is tested via the &lt;a href=&#34;https://travis-ci.org/ganto/ansible-acme_tiny&#34;&gt;Travis-CI&lt;/a&gt; continuous integration platform. It makes use of the &lt;a href=&#34;https://github.com/nickjj/rolespec&#34;&gt;rolespec&lt;/a&gt; Ansible role testing framework for which a small &lt;a href=&#34;https://github.com/ganto/ansible-acme_tiny-test&#34;&gt;test suite&lt;/a&gt; has been written.&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://galaxy.ansible.com/ganto/acme_tiny/&#34;&gt;Ansible Galaxy&lt;/a&gt; is used as a repository for software distribution.&lt;/li&gt;&#xA;&lt;li&gt;The documentation is written in a pimped version of &lt;a href=&#34;https://daringfireball.net/projects/markdown/&#34;&gt;Markdown&lt;/a&gt;, rendered via Sphinx and hosted on &lt;a href=&#34;https://gantoacme-tiny.readthedocs.io/&#34;&gt;Read the Docs&lt;/a&gt; from where it can be accessed and downloaded in various formats.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;That&amp;rsquo;s convenient!&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Policy Routing on Linux based on Sender MAC Address</title>
      <link>https://blog.linuxmonk.ch/2016/policy-routing-on-linux-based-on-sender-mac-address/</link>
      <pubDate>Thu, 21 Apr 2016 07:27:52 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2016/policy-routing-on-linux-based-on-sender-mac-address/</guid>
      <description>&lt;p&gt;I recently had the task to setup and test a new Linux Internet &lt;a href=&#34;https://en.wikipedia.org/wiki/Gateway_%28telecommunications%29&#34;&gt;gateway&lt;/a&gt; host as a replacement to an existing router. The setup is classical with some individual ports such as HTTP being forwarded with &lt;a href=&#34;https://en.wikipedia.org/wiki/Network_address_translation#DNAT&#34;&gt;DNAT&lt;/a&gt; to some backend systems.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2016/04/policy-routing-1.png&#34;&#xA;&#x9;&#x9;&#x9;alt=&#34;Redundant router setup requiring policy routing&#34;&gt;&lt;figcaption&gt;&#xA;&#x9;&#x9;&#x9;&lt;p&gt;Redundant router setup requiring policy routing&lt;/p&gt;&#xA;&#x9;&#x9;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;The new router, from now on I will call it router #2, should be tested and put into operation without downtime. Obviously this means that I had to run the two routers in parallel for a while. The backend systems however, only know one default gateway. Accessing a service through a forwarded port on router #2 resulted in a timeout, as the backend system sent the replies to the wrong gateway where they were dropped.&lt;/p&gt;&#xA;&lt;p&gt;Fortunately &lt;a href=&#34;http://www.netfilter.org/projects/iptables&#34;&gt;iptables&lt;/a&gt; and &lt;a href=&#34;http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2&#34;&gt;iproute2&lt;/a&gt; came to my rescue. They enable you to implement &lt;a href=&#34;https://en.wikipedia.org/wiki/Policy-based_routing&#34;&gt;policy routing&lt;/a&gt; on Linux. This means that the routing decision is not (only) made based on the destination address of a packet as in regular routing, but additional rules are evaluated. In my case: Every connection opened through router #2 has to be replied via router #2.&lt;/p&gt;&#xA;&lt;p&gt;Using &lt;code&gt;iptables/iproute2&lt;/code&gt; for this task this means: Incoming packets with the source MAC address from router #2 are marked with help of the &lt;a href=&#34;http://ipset.netfilter.org/iptables-extensions.man.html#lbDE&#34;&gt;iptables &amp;lsquo;mark&amp;rsquo;&lt;/a&gt; extension. The &lt;a href=&#34;http://ipset.netfilter.org/iptables-extensions.man.html#lbCS&#34;&gt;iptables &amp;lsquo;connmark&amp;rsquo;&lt;/a&gt; extension will then help to associate outgoing packets to the previously marked connection. Based on the mark of the outgoing packet a custom routing policy will set the default gateway to router #2. Easy, eh?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Configuration&lt;/strong&gt;&#xA;Now I&amp;rsquo;ll show some commands how this can be accomplished. The following commands assume that the iptables rule set is still empty and are for demonstration purpose only. Likely they have to be adjusted slightly in a real configuration.&lt;/p&gt;&#xA;&lt;p&gt;First the routing policy will be setup:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Define a custom routing table. There exist some default tables, so the custom entry shouldn&amp;rsquo;t overlap with those. For better understanding I will call it &amp;lsquo;router2&amp;rsquo;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# echo &amp;quot;200 router2&amp;quot; &amp;gt;&amp;gt; /etc/iproute2/rt_tables&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Add a rule to define the condition which packets should lookup the routing in the previously created table &amp;lsquo;router2&amp;rsquo;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# ip rule add fwmark 0x2 lookup router2&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;This means that IP packets with the mark &amp;lsquo;2&amp;rsquo; will be routed according to the table &amp;lsquo;router2&amp;rsquo;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Set the default gateway in the &amp;lsquo;router2&amp;rsquo; table to the IP address of router #2 (e.g. 10.0.0.2):&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# ip route add default via 10.0.0.2 table router2&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;To make sure the routing cache is rebuilt, it need to be flushed after changes:&#xA;&lt;code&gt;# ip route flush cache&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Afterwards I had to make sure that the involved connections coming from router #2 are marked appropriately (above the mark &amp;lsquo;2&amp;rsquo; was used). The &lt;a href=&#34;http://http://ipset.netfilter.org/iptables.man.html#lbAF&#34;&gt;&amp;lsquo;mangle&amp;rsquo; table&lt;/a&gt; is a part of the Linux iptables packet filter and meant for modifying network packets. This is the place where the packet markings will be set.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The first iptables rule will match all packets belonging to a new connection coming from router #2 and sets the previously defined mark &amp;lsquo;2&amp;rsquo;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# iptables --table mangle --append INPUT \ --protocol tcp --dport 80 \ --match state --state NEW \ --match mac --mac-source 52:54:00:c2:a5:43 \ ! --source 10.0.0.0/24 \ --jump MARK --set-mark 0x2&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;The packets being marked are restricted to meet the following requirements:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;being sent by the network adapter of router #2 ( &lt;code&gt;--mac-source&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;don&amp;rsquo;t originate in the local network ( &lt;code&gt;! --source&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;target destination port 80 ( &lt;code&gt;--dport&lt;/code&gt;: example for the HTTP port being forwarded by router #2)&lt;/li&gt;&#xA;&lt;li&gt;belong to a new connection ( &lt;code&gt;--state NEW&lt;/code&gt;)&#xA;Of course additional (or less) extensions can be used to filter the packets according to individual requirements.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Next, the incoming packets are given to the &amp;lsquo;connmark&amp;rsquo; extension which will do the connection tracking of the marked connections:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# iptables --table mangle --append INPUT \ --jump CONNMARK --save-mark&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The packets which can be associated with an existing connection are also marked accordingly:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# iptables --table mangle --append INPUT \ --match state --state ESTABLISHED,RELATED \ --jump CONNMARK --restore-mark&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;All the previous rules where required that the outgoing packets can finally be marked too:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# iptables --table mangle --append OUTPUT \ --jump CONNMARK --restore-mark&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;strong&gt;Debugging&lt;/strong&gt;&#xA;The following commands and iptables rules should help when setting up and/or debugging policy routing with marked packets:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;List policy of routing table &amp;rsquo;table2&amp;rsquo;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# ip route show table router2&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;List defined routing tables:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# cat /etc/iproute2/rt_tables&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Log marked incoming/outgoing packets to syslog:&lt;/p&gt;&#xA;&lt;p&gt;`# iptables -A INPUT -m mark &amp;ndash;mark 0x2 -j LOG&lt;/p&gt;&#xA;&lt;h1 id=&#34;iptables--a-output--m-mark-mark-0x2--j-log&#34;&gt;iptables -A OUTPUT -m mark &amp;ndash;mark 0x2 -j LOG`&lt;/h1&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Setup remote server management of a SuperMicro BMC with FreeIPMI on Linux</title>
      <link>https://blog.linuxmonk.ch/2015/setup-remote-server-management-of-a-supermicro-bmc-with-freeipmi-on-linux/</link>
      <pubDate>Thu, 03 Dec 2015 21:46:00 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2015/setup-remote-server-management-of-a-supermicro-bmc-with-freeipmi-on-linux/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.supermicro.com&#34;&gt;SuperMicro&lt;/a&gt; server mainboards often include a dedicated &lt;a href=&#34;https://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface#Baseboard_management_controller&#34;&gt;Baseband Management Controller&lt;/a&gt; (BMC) which offers out-of-band management of the server system. This is a dedicated embedded chip (&lt;a href=&#34;http://www.supermicro.com/products/nfo/IPMI.cfm&#34;&gt;Specifications&lt;/a&gt;) which allow to power cycle the machine, monitor hardware variables, update firmware, access the operating system console and much more. If you are used to big brand server systems, then you might be more familiar with the term &lt;a href=&#34;https://en.wikipedia.org/wiki/HP_Integrated_Lights-Out&#34;&gt;iLO&lt;/a&gt;, which is the HP Integrated Lights-Out, or &lt;a href=&#34;https://en.wikipedia.org/wiki/IBM_Remote_Supervisor_Adapter#Integrated_Management_Module_.28IMM.29&#34;&gt;IMM&lt;/a&gt;, which is the IBM Integrated Management Module. The basic functionality is always comparable.&lt;/p&gt;&#xA;&lt;h5 id=&#34;freeipmi-management-utility&#34;&gt;FreeIPMI Management Utility&lt;/h5&gt;&#xA;&lt;p&gt;A nice fact is, that most of these out-of-band management solutions support the &lt;a href=&#34;https://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface&#34;&gt;Intelligent Platform Management Interface&lt;/a&gt; (IPMI) specification, which defines an interface for accessing the various functionalities from an operating system (OS) or the network (e.g. for monitoring or OS recovery). For Linux there exists GNU &lt;a href=&#34;https://www.gnu.org/software/freeipmi/&#34;&gt;FreeIPMI&lt;/a&gt; which is a collection of powerful tools for accessing IPMI-compatible BMCs. It is available via default package manager on all major Linux distributions.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Linux Kernel Configuration&lt;/strong&gt;&#xA;As mentioned before, on Linux there are two different ways to access the BMC via IPMI. The first way is directly from the host running on the board connected to the BMC. The connection is done via kernel modules. Make sure you have at least the &lt;code&gt;ipmi_defintf&lt;/code&gt; and &lt;code&gt;ipmi_si&lt;/code&gt; modules loaded. If your kernel doesn&amp;rsquo;t include this modules, you might need to add them to your kernel configuration. The corresponding settings can be found under:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Device Drivers ---&amp;gt;&#xA;   Character Devices ---&amp;gt;&#xA;      &amp;lt;M&amp;gt; IPMI top-level message handler ---&amp;gt;&#xA;          [ ]   Generate a panic event to all BMCs on a panic (NEW)&#xA;          &amp;lt;M&amp;gt;   Device interface for IPMI (NEW)&#xA;          &amp;lt;M&amp;gt;   IPMI System Interface handler (NEW)&#xA;          &amp;lt;M&amp;gt;   IPMI SMBus handler (SSIF) (NEW)&#xA;          &amp;lt;M&amp;gt;   IPMI Watchdog Timer (NEW)&#xA;          &amp;lt;M&amp;gt;   IPMI Poweroff (NEW)&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can check if it&amp;rsquo;s working by invoking &lt;code&gt;ipmi-detect&lt;/code&gt; which should then output something like this:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ipmi-locate&#xA;Probing KCS device using DMIDECODE... done&#xA;IPMI Version: 2.0&#xA;IPMI locate driver: DMIDECODE&#xA;IPMI interface: KCS&#xA;BMC driver device:&#xA;BMC I/O base address: 0xCA2&#xA;Register spacing: 1&#xA;&#xA;Probing SMIC device using DMIDECODE... FAILED&#xA;&#xA;Probing BT device using DMIDECODE... FAILED&#xA;&#xA;Probing SSIF device using DMIDECODE... FAILED&#xA;&#xA;Probing KCS device using SMBIOS... done&#xA;IPMI Version: 2.0&#xA;IPMI locate driver: SMBIOS&#xA;IPMI interface: KCS&#xA;BMC driver device:&#xA;BMC I/O base address: 0xCA2&#xA;Register spacing: 1&#xA;&#xA;Probing SMIC device using SMBIOS... FAILED&#xA;&#xA;Probing BT device using SMBIOS... FAILED&#xA;&#xA;Probing SSIF device using SMBIOS... FAILED&#xA;&#xA;[...]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There was an IPMI 2.0 compatible chip found, so we are good to go.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Network Configuration&lt;/strong&gt;&#xA;The second way to connect via IPMI to the BMC is over the network. For this, there often is a dedicated network port on the mainboard that obviously needs to be connected to a network switch over which you can access it. By default the SuperMicro BMC is configured to get an IP address via DHCP. If the local IPMI connection is working, you can get the IP address by executing:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ipmi-config --checkout --section Lan_Conf&#xA;&#xA;#&#xA;# Section Lan_Conf Comments&#xA;#&#xA;# In the Lan_Conf section, typical networking configuration is setup. Most users&#xA;# will choose to set &amp;#34;Static&amp;#34; for the &amp;#34;IP_Address_Source&amp;#34; and set the&#xA;# appropriate &amp;#34;IP_Address&amp;#34;, &amp;#34;MAC_Address&amp;#34;, &amp;#34;Subnet_Mask&amp;#34;, etc. for the machine.&#xA;#&#xA;Section Lan_Conf&#xA;        ## Possible values: Unspecified/Static/Use_DHCP/Use_BIOS/Use_Others&#xA;        IP_Address_Source                             Use_DHCP&#xA;        ## Give valid IP address&#xA;        IP_Address                                    192.168.1.15&#xA;        ## Give valid MAC address&#xA;        MAC_Address                                   0C:C4:7A:73:18:4F&#xA;        ## Give valid Subnet Mask&#xA;        Subnet_Mask                                   255.255.255.0&#xA;        ## Give valid IP address&#xA;        Default_Gateway_IP_Address                    192.168.1.1&#xA;        ## Give valid MAC address&#xA;        Default_Gateway_MAC_Address                   00:0D:B9:22:15:A2&#xA;        ## Give valid IP address&#xA;        Backup_Gateway_IP_Address                     0.0.0.0&#xA;        ## Give valid MAC address&#xA;        Backup_Gateway_MAC_Address                    00:00:00:00:00:00&#xA;EndSection&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Otherwise you might need to search the DHCP server log for an entry, which IP address was given to the BMC. I recommend to set the BMC IP address to a fixed value, to minimize the risk to loose connectivity in case of major data center issue. This can be done via Web interface at e.g. https://192.168.1.15 or via &lt;code&gt;ipmi-config&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ipmi-config --commit -e Lan_Conf:IP_Address_Source=Static&#xA;# ipmi-config --commit -e Lan_Conf:IP_Address=192.168.1.42&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Alternatively you can write the configuration in file and commit it with the &lt;code&gt;--filename&lt;/code&gt; argument. E.g. create a &lt;em&gt;static-network.conf&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Static network configuration for the BMC&#xA;Section Lan_Conf&#xA;        IP_Address_Source                             Static&#xA;        IP_Address                                    192.168.1.42&#xA;EndSection&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Unfortunately the &lt;code&gt;IP_Address_Source&lt;/code&gt; key cannot be changed concurrently with other &lt;code&gt;Lan_Conf&lt;/code&gt; keys. So we had to run the commit command twice, when specifying the new values on the command line and the same is true with the configuration file option. The first time it will set the &lt;code&gt;IP_Address_Source&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ipmi-config --commit --filename=static-network.conf&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And the second time, it will set the new &lt;code&gt;IP_address&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ipmi-config --commit --filename=static-network.conf&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;However, this is an exception and most other key/value pairs can be changed concurrently. See the &lt;a href=&#34;https://www.gnu.org/software/freeipmi/manpages/man8/ipmi-config.8.html&#34;&gt;ipmi-config(8)&lt;/a&gt; man-page for more details.&lt;/p&gt;&#xA;&lt;p&gt;Eventually we can check if the IPMI interface is reachable via network. This can be done with the &lt;code&gt;ipmi-ping&lt;/code&gt; tool. If the &lt;code&gt;--verbose&lt;/code&gt; argument is added, it will even output some information about the configured authentication settings. E.g.:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ipmi-ping --count 1 --verbose 192.168.1.42&#xA;ipmi-ping 192.168.1.42 (192.168.1.42)&#xA;response received from 192.168.1.42: rq_seq=23, auth: none=clear md2=set md5=set password=set oem=clear anon=clear null=clear non-null=set user=clear permsg=clear&#xA;--- ipmi-ping 192.168.1.42 statistics ---&#xA;1 requests transmitted, 1 responses received in time, 0.0% packet loss&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h5 id=&#34;configure-serial-over-lan-sol-console-access&#34;&gt;Configure Serial-over-LAN (SoL) Console Access&lt;/h5&gt;&#xA;&lt;p&gt;A neat feature of a BMC is the ability to remotely access the Linux console even when the regular network connection to the server is not working any more. However, this needs some additional configuration in the operating system.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Check SoL Settings in BIOS&lt;/strong&gt;&#xA;First, we will check the BIOS settings to make sure the SoL feature is enabled. Note that accessing the BIOS usually already works in the default configuration, so if you are adventurous, you can already connect over remote IPMI (for demonstration purpose I&amp;rsquo;ll use the default user &lt;code&gt;ADMIN&lt;/code&gt;):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ipmi-console -h 192.168.1.42 -u ADMIN -P&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;By default you won&amp;rsquo;t have access to the Linux system yet, so reboot the system via SSH so the BIOS can be setup accordingly. Unfortunately, the IPMI console won&amp;rsquo;t show the system&amp;rsquo;s POST output, so you have to keep pressing the &lt;code&gt;DEL&lt;/code&gt; button in the terminal with the open IPMI console until you see the BIOS main screen. Then go to &lt;code&gt;Advanced -&amp;gt; Serial Port Console Redirection&lt;/code&gt; and make sure, the &lt;code&gt;SOL Console Redirection&lt;/code&gt; is enabled. Also remember how many additional serial ports you have available for configuration in this menu. This will become important when selecting the correct console in the Linux configuration. E.g. my board only has one other serial port (COM1) available and for this one console redirection one mustn&amp;rsquo;t be enabled for SoL to work correctly.&lt;/p&gt;&#xA;&lt;figure&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2015/12/SuperMicro%5FBIOS%5FSoL-Console-Redirection-Settings.png&#34;&#xA;&#x9;&#x9;&#x9;alt=&#34;SuperMicro BIOS settings accessed via ipmi-console&#34;&gt;&lt;figcaption&gt;&#xA;&#x9;&#x9;&#x9;&lt;p&gt;SuperMicro BIOS settings accessed via ipmi-console&lt;/p&gt;&#xA;&#x9;&#x9;&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;If you want to see more verbose POST output, also disable &lt;code&gt;Quiet Boot&lt;/code&gt; in the &lt;code&gt;Advanced -&amp;gt; Boot Feature&lt;/code&gt; menu.&lt;/p&gt;&#xA;&lt;p&gt;Leave the BIOS by pressing &lt;code&gt;Save Changes and Reset&lt;/code&gt;. After a short while you should be greeted by the Grub menu. However, there won&amp;rsquo;t be any more output, as Linux doesn&amp;rsquo;t know yet, where to connect to the SoL console. To exit the IPMI console, you have to press &lt;code&gt;&amp;amp;.&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Setup Serial Console in Linux&lt;/strong&gt;&#xA;If you have a systemd-based distribution all you need to do is to modify the kernel command line and add a serial console. Edit &lt;em&gt;/etc/default/grub&lt;/em&gt; and extend the &lt;code&gt;GRUB_CMDLINE_LINUX&lt;/code&gt; variable as following:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;GRUB_CMDLINE_LINUX=&amp;#34;rd.lvm.lv=vg00/swap rd.lvm.lv=vg00/slash rhgb quiet console=tty0 console=ttyS1,115200n8&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; This has to be &lt;code&gt;/dev/ttyS1&lt;/code&gt; in case the BIOS knows only knows one additional serial port (which would correspond to &lt;code&gt;/dev/ttyS0&lt;/code&gt;). If you have two additional serial ports in the BIOS (COM1/COM2), you must set &lt;code&gt;/dev/ttyS2&lt;/code&gt; here. Don&amp;rsquo;t configure Grub 2 to output itself to the serial console, as this is still handled by the default SoL configuration forwarding the initial system output.&lt;/p&gt;&#xA;&lt;p&gt;Regenerate the &lt;em&gt;grub.cfg&lt;/em&gt; with:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# grub2-mkconfig -o /boot/grub2/grub.cfg&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You might need to adjust the command and &lt;em&gt;grub.cfg&lt;/em&gt; path according to your installation. The next time when the system is booted, the Linux system output will be available on the serial terminal and there will also be a login prompt. If you don&amp;rsquo;t have a systemd-based system, you additionally need to enable the serial console login terminal in the &lt;em&gt;/etc/inittab&lt;/em&gt;. E.g.:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;T1:23:respawn:/sbin/getty -L ttyS1 115200 vt100&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h5 id=&#34;remotely-manage-the-system-over-ipmi&#34;&gt;Remotely Manage the System over IPMI&lt;/h5&gt;&#xA;&lt;p&gt;Now everything we need is in place. We can independently from the Linux operating system or the local system console:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Configure the BMC via &lt;code&gt;ipmi-config&lt;/code&gt; (see above)&lt;/li&gt;&#xA;&lt;li&gt;Access the Linux console via &lt;code&gt;ipmi-console&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Query system sensor values (temperatures, voltages, &amp;hellip;) via &lt;code&gt;ipmi-sensors&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Query system event log via &lt;code&gt;ipmi-sel&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Initiate system startup and power reset via &lt;code&gt;ipmi-power&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Even tough I have the latest available IPMI firmware installed, it sometimes happened to me, that the SoL wouldn&amp;rsquo;t properly connect to the Linux console any more after I disconnected when being in the BIOS. Or that I could navigate through the BIOS but it wouldn&amp;rsquo;t refresh the screen. Unfortunately the only way that I found to fix this, was to reboot the BMC. Of course also this is possible over IPMI:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ bmc-device -h 192.168.1.42 -u ADMIN -P --cold-reset&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There are many other things that you can do via IPMI. Also there are other tools which can access IPMI-enabled BMCs. Another famous one is &lt;a href=&#34;http://sourceforge.net/projects/ipmitool/&#34;&gt;ipmitool&lt;/a&gt;. You might want to checkout Adam Sweet&amp;rsquo;s wiki on &lt;a href=&#34;http://wiki.adamsweet.org/doku.php?id=ipmi_on_linux&#34;&gt;IPMI on Linux&lt;/a&gt; for more details how to use &lt;code&gt;ipmitool&lt;/code&gt;. Personally, I prefer FreeIPMI for being a GNU project, being very intuitive to use and so far it worked perfectly well for everything I needed.&lt;/p&gt;&#xA;&lt;p&gt;If you have some hints or additions, please leave a comment below. Thanks for reading.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Migrate 32bit physical host on RAID 1 to KVM/Xen virtual machine</title>
      <link>https://blog.linuxmonk.ch/2015/migrate-32bit-physical-host-on-raid-1-to-kvmxen-virtual-machine/</link>
      <pubDate>Tue, 01 Dec 2015 01:52:07 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2015/migrate-32bit-physical-host-on-raid-1-to-kvmxen-virtual-machine/</guid>
      <description>&lt;p&gt;I recently had the challenge to migrate a physical host running &lt;a href=&#34;https://www.debian.org/&#34;&gt;Debian&lt;/a&gt;, installed on a ancient 32bit machine with a software RAID 1, to a virtual machine (VM). The migration should be as simple as possible so I decided to attach the original disks to the virtualization host and define a new VM which would boot from these disks. This doesn&amp;rsquo;t sound too complicated but it still included some steps which I was not so familiar with, so I write them down here for later reference. As an experiment I tried the migration on a KVM and a Xen host.&lt;/p&gt;&#xA;&lt;h5 id=&#34;prepare-original-host-for-virtualized-environment&#34;&gt;Prepare original host for virtualized environment&lt;/h5&gt;&#xA;&lt;p&gt;&lt;strong&gt;Enable virtualized disk drivers&lt;/strong&gt;&#xA;The host I wanted to migrate was running a Debian Jessie i686 installation on bare metal hardware. For booting it uses an &lt;a href=&#34;https://wiki.debian.org/initramfs&#34;&gt;initramfs&lt;/a&gt; which loads the required disk controller drivers. By default the initramfs only includes the drivers for the current hardware, so the paravirtualization drivers for KVM ( &lt;code&gt;virtio-blk&lt;/code&gt;) or Xen ( &lt;code&gt;xen-blkfront&lt;/code&gt;) are missing. This can be changed by adjusting the &lt;em&gt;/etc/initramfs-tools/conf.d/driver-policy&lt;/em&gt; file to state that not the currently dependent ( &lt;code&gt;dep&lt;/code&gt;) modules should be loaded, but &lt;code&gt;most&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Driver inclusion policy selected during installation&#xA;# Note: this setting overrides the value set in the file&#xA;# /etc/initramfs-tools/initramfs.conf&#xA;MODULES=most&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Afterwards the initramfs must be rebuilt by running the following command (adjust the kernel version according to the kernel you are running):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# dpkg-reconfigure linux-image-3.16.0-4-686-pae&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now the initramfs contains all required modules to successfully boot the host from a KVM virtio or a Xen blockfront disk device. This can be checked with:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# lsinitramfs /boot/initrd.img-3.16.0-4-686-pae | egrep -i &amp;#34;(xen|virtio).*blk.*\.ko&amp;#34;&#xA;lib/modules/3.16.0-4-686-pae/kernel/drivers/block/virtio_blk.ko&#xA;lib/modules/3.16.0-4-686-pae/kernel/drivers/block/xen-blkback/xen-blkback.ko&#xA;lib/modules/3.16.0-4-686-pae/kernel/drivers/block/xen-blkfront.ko&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Enable serial console&lt;/strong&gt;&#xA;To easily access the server console from the virtualization host, it&amp;rsquo;s required to setup a serial console in the guest, which must be defined in &lt;em&gt;/etc/default/grub&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[...]&#xA;GRUB_CMDLINE_LINUX=&amp;#34;console=tty0 console=ttyS0,115200n8&amp;#34;&#xA;GRUB_SERIAL_COMMAND=&amp;#34;serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1&amp;#34;&#xA;[...]&#xA;# Uncomment to disable graphical terminal (grub-pc only)&#xA;GRUB_TERMINAL=&amp;#34;console serial&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After regenerating the Grub configuration, the boot loader and local console will then also be accessible via &lt;code&gt;virsh console&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# grub-mkconfig -o /boot/grub/grub.cfg&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h5 id=&#34;run-the-host-on-a-kvm-hypervisor&#34;&gt;Run the host on a KVM hypervisor&lt;/h5&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://www.linux-kvm.org/page/Main_Page&#34;&gt;KVM&lt;/a&gt; is nowadays the de-facto default virtualization solution for running Linux on Linux and is very well integrated in all major distributions and a wide range of management tools. Therefore it&amp;rsquo;s really simple to boot the disks into a KVM VM:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Make sure the disks are not already assembled as md-device on the KVM host. I did this by uninstalling the &lt;code&gt;mdadm&lt;/code&gt; utility.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Run the following &lt;code&gt;virt-install&lt;/code&gt; command to define and start the VM:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# virt-install --connect qemu:///system --name myhost --memory 1024 --vcpus 2 --cpu host --os-variant debian7 --arch i686 --import --disk /dev/disk/by-id/ata-WDC_WD10EFRX-68PJCN0_WD-WCC4J4527214 --disk /dev/disk/by-id/ata-WDC_WD10EFRX-68PJCN0_WD-WCC4J4366412 --network bridge=virbr0 --graphics=none&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;To avoid confusion with the disk enumeration of the KVM host kernel, the disk devices are given as unique device paths instead of e.g. &lt;em&gt;/dev/sdb&lt;/em&gt; and &lt;em&gt;/dev/sdc&lt;/em&gt;. This clearly identifies the two disk devices which will then be assembled to a RAID 1 by the guest kernel.&lt;/p&gt;&#xA;&lt;h5 id=&#34;run-the-host-on-a-xen-hypervisor&#34;&gt;Run the host on a Xen hypervisor&lt;/h5&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://xenproject.org/&#34;&gt;Xen&lt;/a&gt; has been a topic in this blog a few times before as I&amp;rsquo;m still using it since its early days. After a long time of major code refactorings it also made huge steps forward within the last few years, so that nowadays it&amp;rsquo;s nearly as easy to setup as KVM and again well supported in the large distributions. Because its architecture is a bit different and Linux is not the only supported platform some things work not quite the same as under KVM. Let&amp;rsquo;s find out&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Prepare Xen Grub bootloader&lt;/strong&gt;&#xA;Xen virtual machines can be booted in various different ways, also depending whether the guest disk is running on an emulated disk controller or as paravirtualized disk. In simple cases, this is done with help of &lt;a href=&#34;http://wiki.xen.org/wiki/PyGrub&#34;&gt;PyGrub&lt;/a&gt; loading a Grub Legacy &lt;em&gt;grub.conf&lt;/em&gt; or a Grub 2 &lt;em&gt;grub.cfg&lt;/em&gt; from a guests &lt;code&gt;/boot&lt;/code&gt; partition. As my &lt;em&gt;grub.cfg&lt;/em&gt; and kernel is &amp;ldquo;hidden&amp;rdquo; in a RAID 1 a fully featured &lt;a href=&#34;https://www.gnu.org/software/grub/&#34;&gt;Grub 2&lt;/a&gt; is required. It is perfectly able to load its configuration from advanced disk setups such as RAID arrays, LVM volumes and more. With Xen such a setup is only possible when using a dedicated boot loader disk image which must be in the target architecture of the virtual machine. As I want to run a 32bit virtual machine, a &lt;code&gt;i386-xen&lt;/code&gt; Grub 2 flavor needs to be compiled as basis for the boot loader image:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Clone the Grub 2 source code:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ git clone git://git.savannah.gnu.org/grub.git&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Configure and build the source code. I was running the following commands on a Gentoo Xen server without issues. On other distributions you might need to install some development packages first:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ cd grub&#xA;$ ./autogen.sh&#xA;$ ./configure --target=i386 --with-platform=xen&#xA;$ make -j3&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Prepare a &lt;em&gt;grub.cfg&lt;/em&gt; for the Grub image. The Grub 2 from the Debian guest host was installed on a mirrored boot disk called &lt;em&gt;/dev/md0&lt;/em&gt; which was mounted to &lt;em&gt;/boot&lt;/em&gt;. Therefore the Grub image must be hinted to load the actual configuration from there:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# grub.cfg for Xen Grub image grub-md0-i386-xen.img&#xA;normal (md/0)/grub/grub.cfg&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Create the Grub image using the previously compiled Grub modules:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# grub-mkimage -O i386-xen -c grub.cfg -o /var/lib/libvirt/images/grub-md0-i386-xen.img -d ~user/grub/grub-core ~user/grub/grub-core/*.mod&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;A more generic guide about generating Xen Grub images can be found at &lt;a href=&#34;https://blog.xenproject.org/2015/01/07/using-grub-2-as-a-bootloader-for-xen-pv-guests/&#34;&gt;Using Grub 2 as a bootloader for Xen PV guests&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Define the virtual machine&lt;/strong&gt; &lt;code&gt;virt-install&lt;/code&gt; can also be used to import disk (images) as Xen virtual machines. This works perfectly fine for e.g. importing &lt;a href=&#34;http://www.projectatomic.io/download/&#34;&gt;Atomic Host&lt;/a&gt; raw images, but unfortunately the setup now is a bit more complicated. It requires me to specify the custom Grub 2 image as guest kernel for which I couldn&amp;rsquo;t find a corresponding &lt;a href=&#34;https://github.com/virt-manager/virt-manager/blob/v1.3.0/man/virt-install.pod&#34;&gt;virt-install argument&lt;/a&gt; (using v1.3.0). Therefore I first created a plain Xen &lt;a href=&#34;http://xenbits.xen.org/docs/4.6-testing/man/xl.cfg.5.html&#34;&gt;xl configuration file&lt;/a&gt; and then converted it to a &lt;a href=&#34;http://libvirt.org/&#34;&gt;libvirt&lt;/a&gt; XML file. The initial configuration &lt;em&gt;/etc/xen/myhost.cfg&lt;/em&gt; looks as following:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;name = &amp;#34;myhost&amp;#34;&#xA;kernel = &amp;#34;/var/lib/libvirt/images/grub-md0-i386-xen.img&amp;#34;&#xA;memory = 1024&#xA;vcpus = 2&#xA;vif = [ &amp;#39;bridge=virbr0&amp;#39; ]&#xA;disk = [ &amp;#39;/dev/disk/by-id/ata-WDC_WD10EFRX-68PJCN0_WD-WCC4J4527214,raw,xvda,rw&amp;#39;, &amp;#39;/dev/disk/by-id/ata-WDC_WD10EFRX-68PJCN0_WD-WCC4J4366412,raw,xvdb,rw&amp;#39; ]&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Eventually this configuration can be converted to a libvirt domain XML with the following command:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# virsh domxml-from-native --format xen-xl --config /etc/xen/myhost.cfg &amp;gt; /etc/libvirt/libxl/myhost.xml&#xA;# virsh --connect xen:/// define /etc/libvirt/libxl/myhost.xml&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;h5 id=&#34;summary&#34;&gt;Summary&lt;/h5&gt;&#xA;&lt;p&gt;At the end, I successfully converted the bare metal host to a KVM and/or Xen virtual machine. Once again Xen ended up being a bit more troublesome, but no nasty hacks were required and both configurations were quite straight forward. The boot loader setup for Xen could definitely be a bit simpler, but still it&amp;rsquo;s nice to see how well Grub 2 and Xen play together now. It&amp;rsquo;s also pleasing to see, that no virtualization specific configurations had to be made within the guest installation. The fact that the disk device names were changing from &lt;em&gt;/dev/sd[ab]&lt;/em&gt; (bare metal) to &lt;em&gt;/dev/vd[ab]&lt;/em&gt; (KVM) and &lt;em&gt;/dev/xvd[ab]&lt;/em&gt; (Xen) was completely absorbed by the &lt;a href=&#34;http://neil.brown.name/blog/mdadm&#34;&gt;mdadm&lt;/a&gt; layer, but even without software RAID the &lt;em&gt;/etc/fstab&lt;/em&gt; entries are nowadays generated by the installers in a way, that such migrations are easy possible.&lt;/p&gt;&#xA;&lt;p&gt;Thanks for reading. If you have some comments, don&amp;rsquo;t hesitate to write a note below.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Kerberized HTTP Auth on Apache/mod_ssl with FreeIPA</title>
      <link>https://blog.linuxmonk.ch/2014/kerberized-http-auth-on-apache-mod_ssl-with-freeipa/</link>
      <pubDate>Thu, 28 Aug 2014 00:20:03 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2014/kerberized-http-auth-on-apache-mod_ssl-with-freeipa/</guid>
      <description>&lt;p&gt;Today I just found out, how super easy it is to setup a safe HTTP authentication via Kerberos with help of &lt;a href=&#34;http://www.freeipa.org&#34; title=&#34;FreeIPA&#34;&gt;FreeIPA&lt;/a&gt;. Having the experience of managing a manually engineered &lt;a href=&#34;http://kerberos.org/software/index.html&#34; title=&#34;MIT Kerberos&#34;&gt;MIT Kerberos&lt;/a&gt;/ &lt;a href=&#34;http://www.openldap.org/&#34; title=&#34;OpenLDAP&#34;&gt;OpenLDAP&lt;/a&gt;/ &lt;a href=&#34;https://wiki.archlinux.org/index.php/Create_a_Public_Key_Infrastructure_Using_the_easy-rsa_Scripts&#34; title=&#34;EasyRSA&#34;&gt;EasyRSA&lt;/a&gt; infrastructure, I&amp;rsquo;m once again blown away by the simplicity and usability of FreeIPA. I&amp;rsquo;ll describe with only a few commands which can be run within less than 10 minutes how it&amp;rsquo;s possible to setup a fully featured Kerberos-authenticated Web server configuration. Prerequisite is a FreeIPA server (a simple guide for installation can be found for example &lt;a href=&#34;http://inbaudwetrust.com/2014/02/12/freeipa-serverclient-setup-on-centos-6-5/&#34; title=&#34;FreeIPA Server Installation&#34;&gt;here&lt;/a&gt;) and a RedHat-based Web server host (RHEL, CentOS, Fedora).&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Required Packages:&lt;/strong&gt;&#xA;First we are going to install the required RPM packages:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# yum install httpd mod_auth_kerb mod_ssl ipa-client&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Register the Web server host at FreeIPA:&lt;/strong&gt;&#xA;Make sure the Web server host is managed by FreeIPA:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ipa-client-install --domain=example.com --server=ipaserver.example.com --realm=EXAMPLE.COM --mkhomedir --hostname=webserver.example.com --configure-ssh --configure-sshd&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Create a HTTP Kerberos Principal and install the Keytab:&lt;/strong&gt;&#xA;The Web server is identified in a Kerberos setup through a keytab, which has to be generated and installed on the Web server host. First make sure that you have a valid Kerberos ticket of a FreeIPA account with enough permissions (e.g. &amp;lsquo;admin&amp;rsquo;):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# kinit admin&#xA;# ipa-getkeytab -s ipaserver.example.com -p HTTP/webserver.example.com -k /etc/httpd/conf/httpd.keytab&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will create a HTTP service principal in the KDC and install the corresponding keytab in the Apache httpd configuration directory. Just make sure that it can be read by the httpd server account:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# chown apache /etc/httpd/conf/httpd.keytab&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Create a SSL certificate&lt;/strong&gt;&#xA;No need to fiddle around with OpenSSL. Requesting, signing and installing a SSL certificate with FreeIPA is one simple command:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# ipa-getcert request -k /etc/pki/tls/private/webserver.key -f /etc/pki/tls/certs/webserver.crt -K HTTP/webserver.example.com -g 3072&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will create a 3072 bit server key, generate a certificate request, send it to the FreeIPA &lt;a href=&#34;http://pki.fedoraproject.org/wiki/PKI_Main_Page&#34; title=&#34;Dogtag CA&#34;&gt;Dogtag CA&lt;/a&gt;, sign it and install the resulting PEM certificate on the Web server host.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Configure Apache HTTPS&lt;/strong&gt;&#xA;The httpd setup is the only and last configuration which needs to be done manually. For HTTPS set the certificate paths in &lt;code&gt;/etc/httpd/conf.d/ssl.conf&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[...]&#xA;SSLCertificateFile /etc/pki/tls/certs/webserver.crt&#xA;SSLCertificateKeyFile /etc/pki/tls/private/webserver.key&#xA;SSLCertificateChainFile /etc/ipa/ca.crt&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Additionally do some SSL stack hardening (you may also want to read &lt;a href=&#34;https://www.insecure.ws/2013/10/11/ssltls-configuration-for-apache-mod_ssl/&#34; title=&#34;SSL/TLS configuration for Apache mod_ssl&#34;&gt;this&lt;/a&gt;):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[...]&#xA;SSLCompression off&#xA;SSLProtocol all -SSLv2 -SSLv3 -TLSv1.0&#xA;SSLHonorCipherOrder on&#xA;SSLCipherSuite &amp;#34;EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH EDH+aRSA !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Kerberos HTTP Authentication:&lt;/strong&gt;&#xA;The final httpd authentication settings for &amp;lsquo;&lt;a href=&#34;http://modauthkerb.sourceforge.net/&#34; title=&#34;mod_auth_kerb&#34;&gt;mod_auth_kerb&lt;/a&gt;&amp;rsquo; are done in &lt;code&gt;/etc/httpd/conf.d/auth_kerb.conf&lt;/code&gt; or any vhost you want:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&amp;lt;Location /&amp;gt;&#xA;  SSLRequireSSL&#xA;  AuthType Kerberos&#xA;  AuthName &amp;#34;Kerberos Login&amp;#34;&#xA;  KrbMethodNegotiate On&#xA;  KrbMethodK5Passwd On&#xA;  KrbAuthRealms EXAMPLE.COM&#xA;  Krb5KeyTab /etc/httpd/conf/httpd.keytab&#xA;  require valid-user&#xA;&amp;lt;/Location&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s it! After restarting the Web server you can login on &lt;a href=&#34;https://webserver.example.com&#34;&gt;https://webserver.example.com&lt;/a&gt; with your IPA accounts. If you don&amp;rsquo;t already have a valid Kerberos ticket in the Web client, &lt;code&gt;KrbMethodNegotiate On&lt;/code&gt; enables interactive password authentication.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Troubleshooting&lt;/strong&gt;&#xA;In case you get the following error message in the httpd error log, make sure the keytab exists and is readable by the httpd account (e.g. &amp;lsquo;apache&amp;rsquo;):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[Wed Aug 27 07:23:04 2014] [debug] src/mod_auth_kerb.c(646): [client 192.168.122.1] Trying to verify authenticity of KDC using principal HTTP/webserver.example.com@EXAMPLE.COM&#xA;[Wed Aug 27 07:23:04 2014] [debug] src/mod_auth_kerb.c(689): [client 192.168.122.1] krb5_rd_req() failed when verifying KDC&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>Quickly setup a Fedora 19 boot disk for serial-only console access</title>
      <link>https://blog.linuxmonk.ch/2014/quickly-setup-a-fedora-19-boot-disk-for-serial-only-console-access/</link>
      <pubDate>Fri, 16 May 2014 00:01:11 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2014/quickly-setup-a-fedora-19-boot-disk-for-serial-only-console-access/</guid>
      <description>&lt;p&gt;I recently bought a &lt;a href=&#34;http://www.pcengines.ch/apu1c4.htm&#34; title=&#34;PC Engines APU1C4&#34;&gt;PC Engines APU1C4&lt;/a&gt; x86 embedded board which is meant to be the board for my future custom NAS box. In comparison to the various ARM boards it promises to be powerful and I/O friendly (3x Gbit LAN, SATA, 3x mini PCIe) and doesn&amp;rsquo;t include redundant graphics and sound circuits. On the other hand the only way to locally access it is via a serial terminal. Before installing the final system, hopefully more about this in a later article, I wanted to have a quick glance at the system from a Linux point of view. I tried booting the device over an USB stick prepared with my favorite live system &lt;a href=&#34;http://www.sysresccd.org&#34; title=&#34;SystemRescueCD&#34;&gt;SystemRescueCD&lt;/a&gt;, which by the way is based on &lt;a href=&#34;https://www.gentoo.org/&#34; title=&#34;Gentoo Linux&#34;&gt;Gentoo&lt;/a&gt;, but somehow failed as the boot process didn&amp;rsquo;t support output on a serial device and never spawned a terminal on it either. Before loosing too much time in searching for another media which would support a serial console, I simply setup my own minimal boot system based on &lt;a href=&#34;https://fedoraproject.org/&#34; title=&#34;Fedora&#34;&gt;Fedora&lt;/a&gt; 19. Here will follow a quick summary on what was required to achive this, as I couldn&amp;rsquo;t find a good and recent how-to about such a setup either. Because this minimal system is meant for ad-hoc booting only, I will keep things as simple as possible.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Prepare the installation medium&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The APU1C4 supports booting over all possible storage devices, so you need to have a spare USB stick, external USB disk, mSATA disk, SATA disk or a SD card for storing the minimal Linux installation. Create at least one partition with a Linux file system of your choice on it and mount it. This will be the root directory of the new system. The following example will show how the setup is done on a device &lt;code&gt;/dev/sdb&lt;/code&gt; with one partition mounted to &lt;code&gt;/mnt/usbdisk&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;host # mount /dev/sdb1 /mnt/usbdisk&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Bootstrap minimal Fedora system in alternative root directory&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Redhat-based distributions have an easy way to install a new system to an alternative root directory. Namely, it can be done with the main package manager yum. To keep it easy I used a Fedora 19 host system to setup the boot disk. While being in the context of the host system (below indicated with &amp;rsquo; &lt;code&gt;host #&lt;/code&gt;&amp;rsquo;), always be careful that your commands are actually modifying the content under &lt;code&gt;/mnt/usbdisk&lt;/code&gt;. Otherwise you might have a bad surprise when you reboot your host system the next time.&lt;/p&gt;&#xA;&lt;p&gt;1. Prepare RPM database:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;host # mkdir -p /mnt/usbdisk/var/lib/rpm&#xA;host # rpm --root /mnt/usbdisk/var/lib/rpm --initdb&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;2. Install Fedora release package:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;host # yumdownloader --destdir=/tmp fedora-release&#xA;host # rpm --root /mnt/usbdisk -ivh /tmp/fedora-release*rpm&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;3. Install a minimal set of packages (add whatever packages you&amp;rsquo;d like to have in the minimal system):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;host # yum --installroot=/mnt/usbdisk install e2fsprogs kernel \&#xA;rpm yum grub2 openssh-client openssh-server passwd less rootfiles \&#xA;vim-minimal dhclient pciutils ethtool dmidecode&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;4. Copy DNS resolver configuration:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;host # cp -p /etc/resolv.conf /mnt/usbdisk/etc&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;5. Mount pseudo file systems for chroot:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;host # mount -t proc none /mnt/usbdisk/proc&#xA;host # mount -t sysfs none /mnt/usbdisk/sys&#xA;host # mount -o bind /dev /mnt/usbdisk/dev&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;5. chroot into the new system tree to finalize the installation:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;host # chroot /mnt/usbdisk /bin/bash&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;6. Set root password&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;chroot # passwd&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;7. Prepare system configurations:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;chroot # echo &amp;#34;NETWORKING=yes&amp;#34; &amp;gt; /etc/sysconfig/network&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;8. If you only have one partition with the entire system, a fstab is not needed anymore as dracut and &lt;a href=&#34;https://fedoraproject.org/wiki/Systemd&#34; title=&#34;Systemd&#34;&gt;Systemd&lt;/a&gt; will already know how to mount it. Otherwise create the fstab (use the UUID if you&amp;rsquo;re not sure how the disk will be called on the target system):&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;chroot # dumpe2fs -h /dev/sdb1 | grep UUID&#xA;dumpe2fs 1.42.7 (21-Jan-2013)&#xA;Filesystem UUID: bfb2fba1-774d-4cfc-a978-5f98701fe58a&#xA;chroot # cat &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; /etc/fstab&#xA;UUID=bfb2fba1-774d-4cfc-a978-5f98701fe58a / ext4 defaults 0 1&#xA;EOF&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;9. Setup &lt;a href=&#34;https://www.gnu.org/software/grub/&#34; title=&#34;Grub 2&#34;&gt;Grub 2&lt;/a&gt; for serial console:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;chroot # cat &amp;lt;&amp;lt; EOF &amp;gt;&amp;gt; /etc/default/grub&#xA;GRUB_DEFAULT=0&#xA;GRUB_TIMEOUT=5&#xA;GRUB_DISTRIBUTOR=&amp;#34;Fedora&amp;#34;&#xA;GRUB_CMDLINE_LINUX_DEFAULT=&amp;#34;&amp;#34;&#xA;GRUB_CMDLINE_LINUX=&amp;#34;console=ttyS0,115200n8 rd.lvm=0 rd.md=0 rd.dm=0 rd.luks=0 LANG=en_US.UTF-8 KEYTABLE=us&amp;#34;&#xA;GRUB_TERMINAL=&amp;#34;serial&amp;#34;&#xA;GRUB_SERIAL_COMMAND=&amp;#34;serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1&amp;#34;&#xA;GRUB_DISABLE_OS_PROBER=true&#xA;EOF&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;chroot # grub2-install /dev/sdb&#xA;chroot # grub2-mkconfig -o /boot/grub2/grub.cfg&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;10. We&amp;rsquo;re done. Exit the chroot and unmount it:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;chroot # exit&#xA;host # umount /mnt/usbdisk/dev&#xA;host # umount /mnt/usbdisk/proc&#xA;host # umount /mnt/usbdisk/sys&#xA;host # umount /mnt/usbdisk&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now you can remove the disk from the host and connect it with the embedded board you want to boot.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Connect to the serial console and start the system&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;For connecting to the embedded board a USB to serial adapter and a &lt;a href=&#34;https://en.wikipedia.org/wiki/Null_modem&#34; title=&#34;null modem&#34;&gt;null modem&lt;/a&gt; cable is required. There exist a number of tools to connect to a serial console on Linux which you probably already know (e.g. &lt;a href=&#34;https://embeddedfreak.wordpress.com/2008/08/12/using-gnu-screen-to-debug-your-serial-port/&#34; title=&#34;screen&#34;&gt;screen&lt;/a&gt; or &lt;a href=&#34;https://alioth.debian.org/projects/minicom&#34; title=&#34;minicom&#34;&gt;minicom&lt;/a&gt;). However, I always found them painful to use. The tool of my choice is called &lt;a href=&#34;http://cutecom.sourceforge.net/&#34; title=&#34;CuteCom&#34;&gt;CuteCom&lt;/a&gt; and is a graphical serial terminal. After selecting the correct serial device ( &lt;code&gt;/dev/ttyUSB0&lt;/code&gt; in my case) and baud rate, you can power on your device and you&amp;rsquo;ll hopefully be greeted by the boot messages of your board and the freshly installed Linux system:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2014/05/CuteCom.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2014/05/CuteCom.png&#34; alt=&#34;CuteCom&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;If there is no output in the terminal make sure, you use null-modem cable or adapter and not a simple serial extension cable. Further check for the correct serial port device in your serial terminal configuration and play around with the baud rate.&lt;/p&gt;&#xA;&lt;p&gt;Good luck and have fun with your embedded device. :-)&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Make Firefox subscribe RSS feeds with TinyTinyRSS</title>
      <link>https://blog.linuxmonk.ch/2014/make-firefox-subscribe-rss-feeds-with-tinytinyrss/</link>
      <pubDate>Sun, 04 May 2014 02:00:23 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2014/make-firefox-subscribe-rss-feeds-with-tinytinyrss/</guid>
      <description>&lt;p&gt;Since Google Reader shutdown its service in the middle of last year, &lt;a href=&#34;http://tt-rss.org&#34; title=&#34;Tiny Tiny RSS&#34;&gt;Tiny Tiny RSS&lt;/a&gt; is one of the better alternatives that one could use for aggregating and reading &lt;a href=&#34;https://en.wikipedia.org/wiki/Rss&#34; title=&#34;RSS&#34;&gt;RSS&lt;/a&gt; feeds. Next to the &lt;a href=&#34;https://play.google.com/store/apps/details?id=org.fox.ttrss&#34; title=&#34;Tiny Tiny RSS App&#34;&gt;official Android app&lt;/a&gt; which unfortunately isn&amp;rsquo;t free of charge, there is an alternative called &lt;a href=&#34;https://play.google.com/store/apps/details?id=org.ttrssreader&#34; title=&#34;TTRSS-Reader&#34;&gt;TTRSS-Reader&lt;/a&gt; which even supports offline synchronization. This combination makes me very happy. But one thing that bothered me since a while, was that subscribing to new feeds was very easy during the days of Google Reader. Today I finally figured out how to setup Firefox to automatically subscribe to a Tiny Tiny RSS instance.&lt;/p&gt;&#xA;&lt;p&gt;First go to the &lt;code&gt;about:config&lt;/code&gt; page in your Firefox and search for the keys starting with &lt;em&gt;browser.contentHandlers&lt;/em&gt;. Here we can configure a title and a URI which is later given as choice when subscribing to a feed. E.g:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;em&gt;browser.contentHandlers.types.1.title&lt;/em&gt;: My Tiny Tiny RSS&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;browser.contentHandlers.types.1.type:&lt;/em&gt; application/vnd.mozilla.maybe.feed&lt;/li&gt;&#xA;&lt;li&gt;&lt;em&gt;browser.contentHandlers.types.1.uri:&lt;/em&gt; URL of your TT-RSS instance&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;http://tt-rss.org/redmine/projects/tt-rss/wiki/FrequentlyAskedQuestions#I-need-a-URL-I-can-call-to-subscribe-to-feed-to-integrate-with-some-third-party-browser-extensionapplication&#34; title=&#34;Subscriber URL for TT-RSS&#34;&gt;subscriber URL for TT-RSS&lt;/a&gt; looks like the following. Of course you have to substitute the domain name with your domain:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;https://example.com/ttrss/public.php?op=subscribe&amp;amp;feed_url=%s&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;At the end, the Firefox configuration should look similar to this screenshot:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2014/05/Firefox-RSS-aboutconfig1.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2014/05/Firefox-RSS-aboutconfig1.png&#34; alt=&#34;Firefox-RSS-about:config&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;After the configuration is done, you have to restart Firefox. If you then browse to a Web site with a RSS feed and you click on it, the Firefox feed subscribtion page will appear. There you eventually can select the newly created entry for Tiny Tiny RSS:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2014/05/Subscribe-feed.png&#34;&gt;&lt;img src=&#34;https://blog.linuxmonk.ch/wp-content/uploads/2014/05/Subscribe-feed.png&#34; alt=&#34;Subscribe feed&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;After selecting the entry, you&amp;rsquo;ll be redirected to your Tiny Tiny RSS instance, where you can configure the feed settings such as category and more.&lt;/p&gt;&#xA;&lt;p&gt;With this last piece of configuration, there is definitely nothing left anymore that makes me miss the time with Google Reader. :-)&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>10 years ago I switched to Gentoo Linux as my main operating system</title>
      <link>https://blog.linuxmonk.ch/2014/10-years-ago-i-switched-to-gentoo-linux-as-my-main-operating-system/</link>
      <pubDate>Sun, 20 Apr 2014 13:11:50 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2014/10-years-ago-i-switched-to-gentoo-linux-as-my-main-operating-system/</guid>
      <description>&lt;p&gt;Finally the day arrived, that I can say, I&amp;rsquo;m a Linux user since 10 years. On April 19 2004, I started my stage1 &lt;a href=&#34;https://www.gentoo.org/&#34; title=&#34;Gentoo Linux&#34;&gt;Gentoo Linux&lt;/a&gt; installation on my main workstation box. Since then, I changed my main desktop to &lt;a href=&#34;https://www.gnome.org/&#34; title=&#34;Gnome&#34;&gt;Gnome&lt;/a&gt;, I adapted my work flow according to what&amp;rsquo;s possible with &lt;a href=&#34;https://en.wikipedia.org/wiki/Open_source&#34; title=&#34;open source&#34;&gt;open source&lt;/a&gt; tools and I never looked back again to my old time with proprietary Windows tools.&lt;/p&gt;&#xA;&lt;p&gt;However, I already made my first Linux experience a few years earlier than 2004. As far as I still remember, my first Linux distribution ever was &lt;a href=&#34;https://en.wikipedia.org/wiki/SUSE_Linux_distributions&#34; title=&#34;SUSE Linux&#34;&gt;SUSE Linux&lt;/a&gt; 7.0, which I was able to install without problems on an old computer of mine. I was kind of lost with this new concept that every small functionality is a program by itself, and why are these applications called so weird anyway? A bit later, I wanted to build a dedicated game and file server for LAN parties and it should run with an easy to maintain and lightweight alternative to Windows. The component that I was proud of the most in this server was a &lt;a href=&#34;http://www.ebabble.net/promise-sx4000/&#34; title=&#34;Promise SX4000&#34;&gt;Promise SX4000&lt;/a&gt; RAID controller which supported RAID5. I made sure that it was supporting Linux before buying it. At that time I learned the hard way, that Linux support doesn&amp;rsquo;t magically mean that the driver code is integrated into the upstream Linux kernel and therefore is supported by every Linux distribution. First, there were only some binary modules available, so my distribution for the server was &lt;a href=&#34;https://en.wikipedia.org/wiki/Red_Hat_Linux&#34; title=&#34;Red Hat Linux&#34;&gt;Red Hat Linux&lt;/a&gt; 7.2. At that time RPMs were still some kind of annoying black magic to me, as there was no automated dependency resolving available by default. I didn&amp;rsquo;t know about &lt;code&gt;yum&lt;/code&gt; which was optionally available already. Eventually, I never really could make the server work properly in the way how I imagined. Also, I learned from my geek friends, that there is Gentoo, which would be the best Linux distribution anyway. With Gentoo Linux I finally succeeded to &lt;a href=&#34;https://forums.gentoo.org/viewtopic.php?t=137397&#34;&gt;install my RAID adapter&lt;/a&gt; and I started learning a basic principle, which I still think it&amp;rsquo;s true today: &lt;em&gt;&amp;ldquo;If some open source software doesn&amp;rsquo;t work how you want, you simply don&amp;rsquo;t try hard enough&amp;rdquo;&lt;/em&gt;. I then also started using Gentoo on my Apple iBook G3, which released me from some Apple Java 1.4 Swing weirdness I experienced during the University programming exercises. These achievements showed me&amp;hellip; Linux, ehmn Gentoo Linux, is the way to go. :-)&lt;/p&gt;&#xA;&lt;p&gt;You may wonder, why I still remember exactly when I originally setup my Gentoo workstation. Simply, because thanks of the rolling release model of Gentoo, I&amp;rsquo;m still running the same installation since then. I still have my &lt;code&gt;emerge.log&lt;/code&gt; around with the entire update history since day one. You want some goodies?&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;First emerged package:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;     Mon Apr 19 14:47:13 2004 &amp;gt;&amp;gt;&amp;gt; sys-apps/portage-2.0.50-r6&#xA;       merge time: 28 seconds.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Original toolchain:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;     Mon Apr 19 15:00:50 2004 &amp;gt;&amp;gt;&amp;gt; sys-devel/binutils-2.14.90.0.7-r4&#xA;       merge time: 4 minutes and 45 seconds.&#xA;&#xA;     Mon Apr 19 15:41:29 2004 &amp;gt;&amp;gt;&amp;gt; sys-devel/gcc-3.3.2-r5&#xA;       merge time: 39 minutes and 34 seconds.&#xA;&#xA;     Mon Apr 19 16:09:44 2004 &amp;gt;&amp;gt;&amp;gt; sys-libs/glibc-2.3.2-r9&#xA;       merge time: 28 minutes.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Original desktop environment and browser:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;     Tue Apr 20 14:51:33 2004 &amp;gt;&amp;gt;&amp;gt; x11-base/xfree-4.3.0-r5&#xA;       merge time: 17 minutes and 26 seconds.&#xA;&#xA;     Wed Apr 21 02:10:24 2004 &amp;gt;&amp;gt;&amp;gt; gnome-base/gnome-2.4.2&#xA;       merge time: 3 seconds.&#xA;&#xA;     Wed Apr 21 11:18:36 2004 &amp;gt;&amp;gt;&amp;gt; net-www/mozilla-firefox-0.8-r2&#xA;       merge time: 42 minutes and 9 seconds.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It&amp;rsquo;s really interesting to dig around in this file. As you can see, it took a few days to compile the entire system, but at the end, I had a system which satisfied my expectations and still serves me well today.&lt;/p&gt;&#xA;&lt;p&gt;With help of the &lt;code&gt;emerge.log&lt;/code&gt;, I can also make some interesting comparisons on how PC hardware evolved. Building &lt;a href=&#34;https://en.wikipedia.org/wiki/OpenOffice.org&#34; title=&#34;OpenOffice.org&#34;&gt;OpenOffice.org&lt;/a&gt; back then on a single core &lt;a href=&#34;https://en.wikipedia.org/wiki/Athlon#Athlon_XP.2FMP&#34; title=&#34;AMD Athlon XP&#34;&gt;AMD Athlon XP&lt;/a&gt; and &lt;a href=&#34;https://en.wikipedia.org/wiki/LibreOffice&#34; title=&#34;LibreOffice&#34;&gt;LibreOffice&lt;/a&gt; today on a six core &lt;a href=&#34;https://en.wikipedia.org/wiki/Phenom_II&#34; title=&#34;AMD Phenom II&#34;&gt;AMD Phenom II&lt;/a&gt;, which is also rather antique already:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;     Thu Sep 23 23:56:56 2004 &amp;gt;&amp;gt;&amp;gt; app-office/openoffice-1.1.2&#xA;       merge time: 6 hours, 18 minutes and 15 seconds.&#xA;&#xA;     Sun Feb  9 11:35:57 2014 &amp;gt;&amp;gt;&amp;gt; app-office/libreoffice-4.1.4.2&#xA;       merge time: 1 hour, 2 minutes and 32 seconds.&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you are interested in more details of my Gentoo emerge history or if you know some tools to automatically analyze or graph the &lt;code&gt;emerge.log&lt;/code&gt;, please leave me a comment below.&lt;/p&gt;&#xA;&lt;p&gt;So how did I evolve during the last 10 years using Linux? I became an IT professional for Linux engineering, I was witnessing how open source software was gaining acceptance in the most conservative IT environments on one side and driving innovation and efficiency on the other side. This wouldn&amp;rsquo;t have been possible without Gentoo, which taught me to dig into documentation and community reports to solve the problems. &lt;strong&gt;A big thanks to Gentoo and the entire Linux and open source community for all their support and motivation!&lt;/strong&gt; I had a great time with you for the last 10 years. At the beginning, I could have never imagined that today the majority of people are running a &lt;a href=&#34;https://en.wikipedia.org/wiki/Android_%28operating_system%29&#34; title=&#34;Andorid&#34;&gt;Linux-based&lt;/a&gt; mobile phone or that Linux is evolving so rapidly as &lt;a href=&#34;https://en.wikipedia.org/wiki/SteamOS&#34; title=&#34;SteamOS&#34;&gt;gaming platform&lt;/a&gt;. I&amp;rsquo;m looking forward to the next 10 years with Linux and open source software&amp;hellip;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>DHCPv6: Stateful Address Autoconfiguration on Linux (Part 1: radvd)</title>
      <link>https://blog.linuxmonk.ch/2013/dhcpv6-stateful-address-autoconfiguration-on-linux-part-1-radvd/</link>
      <pubDate>Thu, 05 Dec 2013 23:33:39 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2013/dhcpv6-stateful-address-autoconfiguration-on-linux-part-1-radvd/</guid>
      <description>&lt;p&gt;There already exist many tutorials how to setup a basic IPv6 network environment on Linux. Most of the time they are limited to an example of a &lt;code&gt;radvd.conf&lt;/code&gt; enabling Router Advertisement and Stateless Address Auto Configuration (&lt;a href=&#34;https://en.wikipedia.org/wiki/IPv6#Stateless_address_autoconfiguration_.28SLAAC.29&#34; title=&#34;SLAAC&#34;&gt;SLAAC&lt;/a&gt;), an example how to configure &lt;a href=&#34;https://www.isc.org/downloads/bind/&#34; title=&#34;BIND&#34;&gt;BIND&lt;/a&gt; to serve DNS requests for AAAA records and reply to IPv6 reverse lookups. Sometimes even DHCPv6 is mentioned as an alternative way to assign IPv6 client addresses, but mostly with a very basic example configuration without fixed address assignments. Building on this basic knowledge, I want to summarize some further settings which might be interesting, when playing around with DHCPv6 in a Linux environment.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;radvd and DHCPv6&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;As I&amp;rsquo;ve already mentioned earlier there is no way around &lt;a href=&#34;http://www.tldp.org/HOWTO/Linux+IPv6-HOWTO/hints-daemons-radvd.html&#34; title=&#34;radvd&#34;&gt;radvd&lt;/a&gt;, at least if your router is based on Linux. Unlike with IPv4, in IPv6 the router can announce its presence with ICMPv6 Router Advertisement messages, triggered by radvd. By default these messages include the &amp;lsquo;Autonomous&amp;rsquo; flag, which enables SLAAC and therefore ask a receiver to autonomously configure its address based on the given IPv6 prefix. In a DHCPv6 subnet you may want to disable this behaviour in the &lt;code&gt;radvd.conf&lt;/code&gt; with the following prefix option:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;AdvAutonomous off;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There are two more &lt;code&gt;radvd.conf&lt;/code&gt; configuration directives which are important in a DHCPv6 setup:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;AdvManagedFlag on;&#xA;AdvOtherConfigFlag on;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The ManagedFlag option (M flag) will hint the receiver to obtain a stateful address via DHCPv6. The OtherConfigFlag option (O flag) is used to inform the receiver that various other configuration information such as DNS, SIP or NTP server address lists can be requested via DHCPv6. The latter is often also used together with SLAAC, in case a client doesn&amp;rsquo;t understand RDNSS and DNSSL announcements.&lt;/p&gt;&#xA;&lt;p&gt;Important: &lt;em&gt;Not all IPv6 clients can handle address assignment if SLAAC is disabled!&lt;/em&gt; According to the &lt;a href=&#34;https://tools.ietf.org/html/rfc4294&#34; title=&#34;RFC4294&#34;&gt;RFC4294&lt;/a&gt; (IPv6 Node Requirement), a IPv6 client must only support address auto-configuration via SLAAC. DHCPv6 may be supported optionally. Especially Windows XP but also Google Android (see &lt;a href=&#34;https://code.google.com/p/android/issues/detail?id=32621&#34; title=&#34;Issue #32621&#34;&gt;Issue #32621&lt;/a&gt;) won&amp;rsquo;t be able to auto-configure a routable IPv6 address without SLAAC.&lt;/p&gt;&#xA;&lt;p&gt;Another interesting radvd option not directly related to DHCPv6, but helpful if you like to analyse your network traffic without being distracted by all the Router Advertisement noise is the following interface option:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;UnicastOnly on;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will prevent radvd from broadcasting Router Advertisements and only reply with a unicast message if it receives a Router Solicitation message from a IPv6 host refreshing its routing table. Together with the possibility to only respond to a predefined list of host IPs in the &lt;code&gt;radvd.conf&lt;/code&gt;, its even possible to run your router in complete stealth mode towards unknown IPv6 clients:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;clients {&#xA;    fd41:3fb2:3196:b1bb:52b:4dc0:1631:6626;&#xA;    fd41:3fb2:3196:b1bb:9d4a:23c:bff:fe08;&#xA;};&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;radvd and ip6tables&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;To protect the router you may want to enable ip6tables. Additionally to the default &lt;a href=&#34;https://en.wikipedia.org/wiki/ICMPv6&#34; title=&#34;ICMPv6&#34;&gt;ICMPv6&lt;/a&gt; messages, such as Neighbor Solicitation/Advertisement and Destination Unreachable, which should be allowed on every IPv6 host anyway, the following rules must be configured to whitelist the radvd communication channels:&lt;/p&gt;&#xA;&lt;p&gt;Allow incoming Router Solicitation (ICMPv6 Type 133) messages:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ip6tables -A INPUT -i &amp;lt;netdevice&amp;gt; -p ipv6-icmp -m icmp6 \&#xA;    --icmpv6-type router-solicitation -j ACCEPT&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Allow outgoing Router Advertisement (ICMPv6 Type 134) messages:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ip6tables -A OUTPUT -o &amp;lt;netdevice&amp;gt; -p ipv6-icmp -m icmp6 \&#xA;    --icmpv6-type router-advertisement -j ACCEPT&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s it for the moment. In part 2 of my DHCPv6 series, I&amp;rsquo;ll show you some interesting Linux DHCP server configuration directives. Stay tuned and don&amp;rsquo;t hesitate to leave a comment in case this article was helpful for you or if I got it all wrong&amp;hellip; ;-)&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Building a RPM for Oracle JRockit JDK (with mock)</title>
      <link>https://blog.linuxmonk.ch/2013/building-a-rpm-for-oracle-jrockit-jdk-with-mock/</link>
      <pubDate>Wed, 01 May 2013 13:07:10 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2013/building-a-rpm-for-oracle-jrockit-jdk-with-mock/</guid>
      <description>&lt;p&gt;Since a while, I always wanted to dig into RPM packaging as it would be very useful in my daily work with several hundreds of Red Hat machines. But I didn&amp;rsquo;t find a challenging software to package since it&amp;rsquo;s hard to find popular tools not available as RPM or at least SRPM already. This lasted until recently when I had to update Oracle JRockit Java, an enterprise JDK used with the Oracle Weblogic server, on multiple dozens of machines. Accurately defined the default installation of the JDK consists of only one folder which could be tar&amp;rsquo;ed and copied over, but a real Linux admin knows, this is not the way to install software. After several days of try and error and researching JVM packaging, the result is now available on my GitHub &lt;a href=&#34;http://github.com/ganto&#34; title=&#34;profile&#34;&gt;profile&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Download Spec File and Oracle JRockit Installer&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;The easiest way to get the .spec file is to clone the &lt;a href=&#34;https://github.com/ganto/oracle-jrockit-rpm&#34;&gt;oracle-jrockit-rpm&lt;/a&gt; repository:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;[user@host ~]$ git clone https://github.com/ganto/oracle-jrockit-rpm.git&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;The following files from the repository are then required to build the RPM:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;oracle-jrockit-rpm/SOURCES/jrockit-silent.xml oracle-jrockit-rpm/SPECS/java-1.6.0-jrockit.spec&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Also download the Oracle JRockit &lt;a href=&#34;http://www.oracle.com/technetwork/middleware/jrockit/downloads/index.html&#34;&gt;installer&lt;/a&gt;, the x64 and ia32 version is supported by the spec file, and place it into the &lt;em&gt;oracle-jrockit-rpm/SOURCES&lt;/em&gt; directory.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Use mock to build the RPMs&lt;/strong&gt; &lt;a href=&#34;https://fedoraproject.org/wiki/Projects/Mock&#34;&gt;Mock&lt;/a&gt; is a useful tool to build RPMs for various target platforms. Even for the Gentoo friends it is &lt;a href=&#34;http://packages.gentoo.org/package/dev-util/mock&#34;&gt;available&lt;/a&gt; in the portage.&lt;/p&gt;&#xA;&lt;p&gt;In the first step a chroot environment for the target distribution has to be setup. Mock already comes with a fair number of different definition files for different distributions, which can be found in &lt;em&gt;/etc/mock&lt;/em&gt;. They can be adapted according to different requirements, e.g. when a local mirror or a different base set of packages should be used. When building RPMs for RHEL/CentOS 6, I had to modify the &lt;em&gt;epel-6-x86_64.cfg&lt;/em&gt; to use the following setup command:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;config_opts[&#39;chroot_setup_cmd&#39;] = &#39;install bash bzip2 coreutils cpio diffutils findutils gawk gcc grep sed gcc-c++ gzip info patch redhat-rpm-config rpm-build shadow-utils tar unzip util-linux-ng which make&#39;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;After adding the unprivileged build user to the &amp;lsquo;mock&amp;rsquo; group, the chroot can be initialized with the following command. In this example I want to build the RPMs for the already mentioned RHEL/CentOS 6 distributions:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;[user@host ~]$ mock -r epel-6-x86_64 --init&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Next, the SRPM needs to be packaged:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;[user@host ~]$ mock -r epel-6-x86_64 --buildsrpm --spec oracle-jrockit-rpm/SPECS/java-1.6.0-jrockit.spec --sources oracle-jrockit-rpm/SOURCES&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Eventually, the final RPMs can be compiled:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;[user@host ~]$ mock -r epel-6-x86_64 --rebuild /var/lib/mock/epel-6-x86_64/root/builddir/build/SRPMS/java-1.6.0-jrockit-1.6.0.37_R28.2.5_4.1.0-1.el6.src.rpm&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;If everything went well, the final RPMs can be found under &lt;em&gt;/var/lib/mock/epel-6-x86_64/root/builddir/build/RPMS&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;[user@host ~]$ ls -1 /var/lib/mock/epel-6-x86_64/root/builddir/build/RPMS java-1.6.0-jrockit-1.6.0.37_R28.2.5_4.1.0-1.el6.x86_64.rpm java-1.6.0-jrockit-demo-1.6.0.37_R28.2.5_4.1.0-1.el6.noarch.rpm java-1.6.0-jrockit-devel-1.6.0.37_R28.2.5_4.1.0-1.el6.x86_64.rpm java-1.6.0-jrockit-jdbc-1.6.0.37_R28.2.5_4.1.0-1.el6.x86_64.rpm java-1.6.0-jrockit-missioncontrol-1.6.0.37_R28.2.5_4.1.0-1.el6.x86_64.rpm java-1.6.0-jrockit-src-1.6.0.37_R28.2.5_4.1.0-1.el6.x86_64.rpm&lt;/code&gt; &lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Of course this guide can be used to build any RPM also from other spec files and for other distributions. With these notes, I hope to be more productive when an RPM quickly has to be compiled in the future.&lt;/p&gt;&#xA;&lt;p&gt;If you find a bug in the spec file, feel free to open an issue on GitHub, so I can fix and learn from it. Otherwise just leave a comment below if you think this guide or the spec file was useful.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Gentoo Linux client for FreeIPA</title>
      <link>https://blog.linuxmonk.ch/2012/gentoo-linux-client-for-freeipa/</link>
      <pubDate>Sun, 02 Dec 2012 20:31:53 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2012/gentoo-linux-client-for-freeipa/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://freeipa.org&#34; title=&#34;freeipa&#34;&gt;FreeIPA&lt;/a&gt; is an integrated user, host and service identity management solution combining &lt;a href=&#34;http://directory.fedoraproject.org&#34; title=&#34;389 directory server&#34;&gt;389 Directory Server&lt;/a&gt; (LDAP), &lt;a href=&#34;http://web.mit.edu/kerberos/&#34; title=&#34;MIT kerberos&#34;&gt;MIT Kerberos&lt;/a&gt;, a &lt;a href=&#34;https://www.isc.org/software/bind&#34; title=&#34;bind dns&#34;&gt;BIND DNS&lt;/a&gt; server and the &lt;a href=&#34;http://pki.fedoraproject.org&#34; title=&#34;dogtag CA&#34;&gt;Dogtag Certificate Authority&lt;/a&gt; service with a simple but powerful Web GUI and an extensive command line interface for easy administration. It claims to become something like an Active Directory for Linux and Unix environments and is heavily pushed by Red Hat, which also integrates it as &lt;a href=&#34;http://www.europe.redhat.com/products/identity_management/ipa.php&#34; title=&#34;IPA&#34;&gt;IPA&lt;/a&gt; server in their &lt;a href=&#34;https://www.redhat.com/products/enterprise-linux/&#34; title=&#34;RHEL&#34;&gt;Red Hat Enterprise Linux&lt;/a&gt; distribution. A nice overview can be found in this &lt;a href=&#34;http://www.redhat.com/summit/2011/presentations/summit/whats_next/friday/pal_crittenden_f_1100_ipa_overview_rev3.pdf&#34; title=&#34;IPA presentation&#34;&gt;presentation&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;After having the pleasure of playing around with the Red Hat IPA server on RHEL and &lt;a href=&#34;https://www.centos.org/&#34; title=&#34;CentOS&#34;&gt;CentOS&lt;/a&gt; for the past few weeks, I also wanted to use this excellent identity management platform with my &lt;a href=&#34;http://www.gentoo.org/&#34; title=&#34;Gentoo&#34;&gt;Gentoo&lt;/a&gt; Linux boxes. Some years ago, a bug report was opened in the Gentoo bugzilla (&lt;a href=&#34;https://bugs.gentoo.org/show_bug.cgi?id=297665&#34; title=&#34;#297665&#34;&gt;#297665&lt;/a&gt;), to coordinate the inclusion of FreeIPA in Gentoo. Andreis Vinogradovs, another Gentoo user, then started an effort, to write &lt;a href=&#34;https://code.google.com/p/slepnoga/&#34;&gt;some of the necessary ebuilds&lt;/a&gt; for building FreeIPA, however they are still far from complete and therefore haven&amp;rsquo;t made it into the &lt;a href=&#34;http://packages.gentoo.org/&#34; title=&#34;official gentoo repository&#34;&gt;official Gentoo repository&lt;/a&gt; yet. This means that FreeIPA is unfortunately still not fully available for Gentoo.&lt;/p&gt;&#xA;&lt;p&gt;Based on Andreis&amp;rsquo; work, I started another effort, to update and polish the FreeIPA ebuild and its dependencies, so that they can be used on a Gentoo Linux box. The server part has dozens of dependencies not yet officially integrated in Gentoo, and the available ebuilds are mostly outdated, so I haven&amp;rsquo;t put too much effort yet into integrating the server parts on Gentoo. Especially the entire PKI infrastructure is still missing.&lt;/p&gt;&#xA;&lt;p&gt;However, I succeeded to configure a Gentoo box as full-featured FreeIPA client, including OpenRC support for `authconfig` and `ipa-client-install`. I also found and reported some bugs in official Gentoo ebuilds (&lt;a href=&#34;https://bugs.gentoo.org/show_bug.cgi?id=445394&#34; title=&#34;#445394&#34;&gt;#445394&lt;/a&gt;, &lt;a href=&#34;https://bugs.gentoo.org/show_bug.cgi?id=445478&#34; title=&#34;#445478&#34;&gt;#445478&lt;/a&gt;), where you have to work-around in case you try out the setup yourself.&lt;/p&gt;&#xA;&lt;p&gt;Of course you are curious now, where you can find the ebuilds. Because the work on them and especially the testing is still ongoing, I created a &lt;a href=&#34;https://github.com/ganto/freeipa&#34; title=&#34;github freeipa&#34;&gt;repository on Github&lt;/a&gt; so that everybody who is interested can have a look at ebuilds and provide constructive feedback in terms of pull requests.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m especially looking for people who would like to try the FreeIPA client with a Gentoo &lt;a href=&#34;https://wiki.gentoo.org/wiki/Systemd&#34; title=&#34;gentoo systemd&#34;&gt;systemd&lt;/a&gt; or/and a hardened &lt;a href=&#34;https://wiki.gentoo.org/wiki/SELinux&#34; title=&#34;gentoo selinux&#34;&gt;SELinux&lt;/a&gt; system.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;How can you test the FreeIPA client on your Gentoo box?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;You have to begin with setting up a (Free)IPA server, which is currently only possible on a Red Hat-based distribution. The easiest way is to setup a CentOS 6 VM, then run:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;[root@centos6 ~]# yum install ipa-server [root@centos6 ~]# ipa-server-install&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;More information can be found in the upstream &lt;a href=&#34;http://freeipa.org/page/InstallAndDeploy&#34; title=&#34;freeipa installation&#34;&gt;installation guide&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Then add the &amp;lsquo;freeipa-overlay&amp;rsquo; to the layman configuration of your Gentoo client. How you do this is described &lt;a href=&#34;https://github.com/ganto/freeipa/wiki/Overlay-Configuration&#34; title=&#34;freeipa overlay configuration&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;ATTENTION:&lt;/strong&gt; &lt;em&gt;This guide is meant to be for experimental testing only. Don&amp;rsquo;t do this on your workstation if you are not familiar with FreeIPA and its technologies. I don&amp;rsquo;t take any responsibility if you blow up your machine. &lt;strong&gt;You have been warned!&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Finally you are ready to emerge FreeIPA. Make sure tho have a look at the various&#xA;USE flags. They don&amp;rsquo;t have too much influence on build-time functionality but&#xA;on run-time dependencies. So you can slim down your installation in case you&#xA;already know, that you don&amp;rsquo;t need another DNS server or winbind support for&#xA;example. Set the &amp;lsquo;minimal&amp;rsquo; USE flag for only building the IPA client&lt;br&gt;&#xA;( &lt;strong&gt;Update 07.12.2012:&lt;/strong&gt; This USE flag was replaces with &amp;lsquo;server&amp;rsquo;, so the client will be installed by default):&#xA;&lt;code&gt; gentoo ~ # emerge -av freeipa&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Some &lt;a href=&#34;http://en.gentoo-wiki.com/wiki/Gentoo_maintenance#Unmasking_packages_masked_by_keyword&#34; title=&#34;keyword unmasking&#34;&gt;keyword unmasking&lt;/a&gt; may be required when you run a stable Gentoo installation.&lt;/p&gt;&#xA;&lt;p&gt;Before you can start your IPA client installation, you have to make sure, that an empty NSS certificate database exists. This is expected to be under &lt;em&gt;/etc/pki/nssdb&lt;/em&gt;. Gentoo however puts all the SSL stuff under &lt;em&gt;/etc/ssl&lt;/em&gt;. I solved this by creating a symlink:&#xA;&lt;code&gt;gentoo ~ # ln -s ssl /etc/pki gentoo ~ # certutil -N -d /etc/pki/nssdb&lt;/code&gt;&#xA;Eventually the IPA client can be configured. E.g.:&#xA;&lt;code&gt;gentoo ~ # ipa-client-install --mkhomedir --no-dns-sshfp Discovery was successful! Hostname: gentoo.example.com Realm: EXAMPLE.COM DNS Domain: example.com IPA Server: centos6.example.com BaseDN: dc=example,dc=com Continue to configure the system with these values? [no]: yes User authorized to enroll computers: admin Synchronizing time with KDC... Password for admin@EXAMPLE.COM: Enrolled in IPA realm EXAMPLE.COM Created /etc/ipa/default.conf Domain example.com is already configured in existing SSSD config, creating a new one. The old /etc/sssd/sssd.conf is backed up and will be restored during uninstall. Configured /etc/sssd/sssd.conf Configured /etc/krb5.conf for IPA realm EXAMPLE.COM SSSD enabled Configured /etc/openldap/ldap.conf NTP enabled Configured /etc/ssh/ssh_config Warning: Installed OpenSSH server does not support dynamically loading authorized user keys. Public key authentication of IPA users will not be available. Configured /etc/ssh/sshd_config Client configuration complete.&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;That&amp;rsquo;s it! Your system is now able to use user accounts created on the IPA server. Check it with:&#xA;&lt;code&gt;gentoo ~ # id admin uid=155960000(admin) gid=155960000(admins) groups=155960000(admins)&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;As you can see in the generated &lt;em&gt;/etc/pam.d/system-auth&lt;/em&gt;, pam_unix will be checked before pam_sssd. This means your local user accounts still have precedence towards the IPA accounts.&lt;/p&gt;&#xA;&lt;p&gt;Happy testing&amp;hellip; :-)&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>LVM boot with dracut and OpenRC on Gentoo</title>
      <link>https://blog.linuxmonk.ch/2012/openrc-dracut-gentoo-2/</link>
      <pubDate>Wed, 31 Oct 2012 00:24:57 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2012/openrc-dracut-gentoo-2/</guid>
      <description>&lt;p&gt;As a Linux enthusiast and Gentoo user I was always looking for the perfect boot experience. While I managed to boot my kernel with EFI and grub 2 (as described in my &lt;a href=&#34;https://trac.linuxmonk.ch/wiki/LinuxMonk/Sysadmin/SystemRescue#RestoreUEFISystemPartition&#34; title=&#34;wiki&#34;&gt;wiki&lt;/a&gt;), I still had some troubles with &lt;a href=&#34;http://www.gentoo.org/proj/en/base/openrc/&#34; title=&#34;OpenRC&#34;&gt;OpenRC&lt;/a&gt; playing nice with my LVM-only setup initialized by &lt;a href=&#34;https://dracut.wiki.kernel.org/index.php/Main_Page&#34; title=&#34;dracut&#34;&gt;dracut&lt;/a&gt;. Tonight I finally figured out the missing configuration pieces to shut up all warnings on system init.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Initial situation&lt;/strong&gt;&#xA;All my Linux partitions are stored in a single LVM volume group, to stay as flexible as possible:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;merkur ~ # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT [...] └─sda5 8:5 0 49.5G 0 part ├─vg_merkur-slash (dm-0) 253:0 0 2.5G 0 lvm / ├─vg_merkur-boot (dm-1) 253:1 0 200M 0 lvm /boot ├─vg_merkur-tmp (dm-2) 253:2 0 6G 0 lvm /tmp ├─vg_merkur-swap (dm-3) 253:3 0 4G 0 lvm [SWAP] ├─vg_merkur-var (dm-4) 253:4 0 4G 0 lvm /var ├─vg_merkur-usr (dm-5) 253:5 0 12.8G 0 lvm /usr └─vg_merkur-opt (dm-6) 253:6 0 8G 0 lvm /opt&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;My boot toolset currently consists of grub-2.00-r1, kernel-3.6.4, dracut-024, lvm-2.02.95-r4 and openrc-0.11.2&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Kernel Configuration&lt;/strong&gt;&#xA;Before compiling the kernel, make sure to include all the required configurations. For this setup, the most important ones are:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;CONFIG_BLK_DEV_INITRD CONFIG_DEVTMPFS CONFIG_MODULES CONFIG_SYSVIPC&lt;/code&gt; &lt;strong&gt;Dracut Configuration&lt;/strong&gt;&#xA;Before installing dracut, the desired modules have to be configured in &lt;em&gt;/etc/make.conf&lt;/em&gt;. :&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;DRACUT_MODULES=&amp;quot;caps lvm mdraid syslog&amp;quot;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;For this setup at least the &amp;ldquo;lvm&amp;rdquo; module is mandatory. Further dracut was built with the &amp;ldquo;device-mapper&amp;rdquo; USE flag enabled.&lt;/p&gt;&#xA;&lt;p&gt;Altough some Linux developers (especially from Red Hat/Fedora) advice against a &lt;a href=&#34;http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken&#34;&gt;separate &lt;em&gt;/usr&lt;/em&gt; partition&lt;/a&gt; because of many boot time dependencies on this system path, I didn&amp;rsquo;t bother much to change my years old setup. Since version 014, dracut includes a module to fill this gap (&lt;a href=&#34;https://git.kernel.org/?p=boot/dracut/dracut.git;a=blob;f=modules.d/98usrmount/mount-usr.sh;hb=HEAD&#34; title=&#34;mount-usr.sh&#34;&gt;&lt;em&gt;/usr/lib/dracut/modules.d/98usrmount/mount-usr.sh&lt;/em&gt;&lt;/a&gt;). It simply mounts the &lt;em&gt;/usr&lt;/em&gt; partition right after the root file system early in the boot process. Therefore we have to make sure that the dracut modules &amp;ldquo;usrmount&amp;rdquo; and &amp;ldquo;lvm&amp;rdquo; are included in the initramfs, which was possible without any manual modification of &lt;em&gt;/etc/dracut.conf&lt;/em&gt;, when generating the boot image with:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;dracut -H&lt;/code&gt; &lt;strong&gt;Kernel Command Line Configuration&lt;/strong&gt;&#xA;Dracut runtime parameters are given on the kernel command line in the Grub configuration. To automatically enable the LVM Volume Group and spawning a debug shell in case the boot should fail, I added the following parameters in grub:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;root=/dev/vg_merkur/slash rd.lvm.vg=vg_merkur rd.shell&lt;/code&gt; &lt;strong&gt;LVM Configuration&lt;/strong&gt;&#xA;Since dracut is now responsible to enable our volume group, the corresponding init script has to be disabled:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;rc-update del lvm boot&lt;/code&gt; &lt;strong&gt;Fsck and Fstab&lt;/strong&gt;&#xA;When booting the system now, the &lt;em&gt;/etc/init.d/fsck&lt;/em&gt; script will complain that it cannot check the file systems which are already mounted. Fortunately, the init script allows us to define that fsck should be only run when specific &amp;ldquo;fs_passno&amp;rdquo; values are set. I therefore this value to &amp;ldquo;1&amp;rdquo; for the file systems which are mounted by dracut and to &amp;ldquo;2&amp;rdquo; for all the file systems which should be checked by OpenRC. Take care, when specifying a value of &amp;ldquo;0&amp;rdquo;, the file system will be never checked for consistency:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# [fs]&#x9;&#x9;[mountpoint]&#x9;[type]&#x9;[opts]&#x9;&#x9;&#x9;&#x9;[dump/pass] /dev/vg_merkur/boot&#x9;/boot&#x9;&#x9;ext2&#x9;noatime,nosuid,nodev&#x9;&#x9;0 2 /dev/vg_merkur/slash&#x9;/&#x9;&#x9;ext4&#x9;noatime,discard&#x9;&#x9;&#x9;0 1 /dev/vg_merkur/usr&#x9;/usr&#x9;&#x9;ext4&#x9;noatime,discard,nodev&#x9;&#x9;0 1 /dev/vg_merkur/var&#x9;/var&#x9;&#x9;ext4&#x9;noatime,discard,nosuid,nodev&#x9;0 2 /dev/vg_merkur/opt      /opt&#x9;&#x9;ext4&#x9;noatime,discard,nosuid,nodev&#x9;0 2 /dev/vg_merkur/tmp&#x9;/tmp&#x9;&#x9;ext4&#x9;noatime,discard,nosuid,nodev&#x9;0 2 /dev/vg_merkur/swap&#x9;none&#x9;&#x9;swap&#x9;sw&#x9;&#x9;&#x9;&#x9;0 0&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;In &lt;em&gt;/etc/conf.d/fsck&lt;/em&gt; we then can define, that the fsck init script should only care about file systems with a &amp;ldquo;fs_passno&amp;rdquo; larger than &amp;ldquo;1&amp;rdquo;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;fsck_passno=&amp;quot;&amp;gt;1&amp;quot;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;That&amp;rsquo;s it&amp;hellip; If you have some questions or hints, please leave a comment.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Webtip - 1. November 2009</title>
      <link>https://blog.linuxmonk.ch/2009/webtip-1-november-2009/</link>
      <pubDate>Sun, 01 Nov 2009 05:25:00 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2009/webtip-1-november-2009/</guid>
      <description>&lt;p&gt;Ever heard about the &amp;ldquo;Busy Beaver Problem&amp;rdquo;? Interesting introduction and visualization with lots of source code (Python, C++, Perl)&lt;/p&gt;&#xA;&lt;p&gt;catonmat.net: &lt;a href=&#34;http://www.catonmat.net/blog/busy-beaver/&#34;&gt;The Busy Beaver Problem&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Migrate trac-0.11.x from Debian Etch to Lenny</title>
      <link>https://blog.linuxmonk.ch/2009/migrate-trac-011x-from-debian-etch-to-lenny/</link>
      <pubDate>Sun, 18 Oct 2009 23:59:35 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2009/migrate-trac-011x-from-debian-etch-to-lenny/</guid>
      <description>&lt;p&gt;Since I was using the nice &lt;a href=&#34;http://trac.edgewall.org/wiki/TracFineGrainedPermissions&#34;&gt;FineGradePermissions&lt;/a&gt; feature of the &lt;a href=&#34;http://trac.edgewall.org/&#34;&gt;trac&lt;/a&gt; 0.11 release, and Debian was only providing trac-0.10.3 in Etch, I had a custom trac installation running on my Etch server. For migrating to Lenny you would normally think that it&amp;rsquo;s enough to just copy your project directory to the new installation. Unfortunately this results in a nasty error message:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;DatabaseError: file is encrypted or is not a database&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Hmn, so let&amp;rsquo;s check the trac &lt;a href=&#34;http://trac.edgewall.org/wiki/TracMigrate&#34;&gt;migration guide&lt;/a&gt; which advises you to first export the sqlite database with sqlite3 in a plain SQL file. Not much luck here either, the result is an empty database:&#xA;`&lt;/p&gt;&#xA;&lt;h1 id=&#34;sqlite3-tracdb-dump&#34;&gt;sqlite3 trac.db .dump&lt;/h1&gt;&#xA;&lt;p&gt;BEGIN TRANSACTION;&#xA;COMMIT;&#xA;`&lt;/p&gt;&#xA;&lt;p&gt;The reason is the trac installation in Etch was using the python-sqlite-1.0.1 back-end which uses the SQLite 2 format while in Lenny there is python-pysqlite2-2.4.1 which only knows about SQLite 3.&lt;/p&gt;&#xA;&lt;p&gt;The conversion from SQLite 2 to 3 can be done by first exporting the database with the sqlite tool and then re-importing it with sqlite3:&#xA;`&lt;/p&gt;&#xA;&lt;h1 id=&#34;sqlite-tracdb-dump--sqlite3-trac3db&#34;&gt;sqlite trac.db .dump | sqlite3 trac3.db&lt;/h1&gt;&#xA;&lt;p&gt;`&lt;/p&gt;&#xA;&lt;p&gt;More infos about this can be found at the trac upgrade notes &lt;a href=&#34;http://trac.edgewall.org/wiki/0.10/TracUpgrade#From0.8.xto0.9&#34;&gt;from 0.8.x to 0.9&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Finally your trac installation should work again as usual.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Using vanilla kernel to run as &#39;paravirt_ops&#39; Xen domU</title>
      <link>https://blog.linuxmonk.ch/2008/using-vanilla-kernel-to-run-as-paravirt_ops-xen-domu/</link>
      <pubDate>Thu, 16 Oct 2008 15:51:41 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2008/using-vanilla-kernel-to-run-as-paravirt_ops-xen-domu/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://xen.org/&#34;&gt;Xen&lt;/a&gt; is nowadays a widespread approach to run virtual hosts. Thanks to its flexible configuration it&amp;rsquo;s not only possible to run virtual Linux hosts but nearly any operating system that is compatible to the Xen &lt;a href=&#34;http://en.wikipedia.org/wiki/Hypervisor&#34;&gt;hypervisor&lt;/a&gt; machine architecture will possibly run as guest host. The Xen &lt;a href=&#34;http://en.wikipedia.org/wiki/Paravirtualization&#34;&gt;paravirtualization&lt;/a&gt; feature, which provides a tighter association between the hypervisor and the guest kernel makes it especially interesting for running performance critical Linux guests.&lt;/p&gt;&#xA;&lt;p&gt;For using Xen virtualization a separate patchset always had to be applied to the hypervisor and also the paravirtualized Linux kernel. Because of this it wasn&amp;rsquo;t always easy to migrate physical servers into virtual one&amp;rsquo;s, especially when requiring a special kernel version or another profound Linux patchset.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;What is paravirt_ops?&lt;/strong&gt;&#xA;Paravirt_ops is a generic kernel structure that represents an interface to a virtualization hypervisor. It allows the kernel to run natively on the hardware but also virtual on a hypervisor. Since kernel 2.6.23 paravirt_ops support for Xen is integrated into the vanilla kernel and since then also support for &lt;a href=&#34;http://lwn.net/Articles/175706/&#34;&gt;VMI&lt;/a&gt; (&lt;a href=&#34;http://www.vmware.com/&#34;&gt;VMware&lt;/a&gt;) and &lt;a href=&#34;http://kvm.qumranet.com/kvmwiki&#34;&gt;KVM&lt;/a&gt; was added. It is a first step to integrate full Xen compatibility into the mainline kernel tree. Today, with kernel 2.6.27, Xen paravirt_ops support exists at least for the x86 and x86_64 architecture.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;How can I use the vanilla kernel as Xen domU?&lt;/strong&gt;&#xA;If you build the kernel by yourself, like every real man does, you have to activate the following features. Build the support directly into the kernel that you don&amp;rsquo;t have to fiddle around with an &lt;a href=&#34;http://en.wikipedia.org/wiki/Initrd&#34;&gt;initramfs&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Processor type and features  ---&amp;gt;&#xA;[*] Paravirtualized guest support  ---&amp;gt;&#xA;--- Paravirtualized guest support&#xA;[*]   Xen guest support&#xA;...&#xA;[*] PAE (Physical Address Extension) Support&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Device Drivers  ---&amp;gt;&#xA;[*] Block devices  ---&amp;gt;&#xA;&amp;lt;*&amp;gt;   Xen virtual block device support&#xA;...&#xA;[*] Network device support  ---&amp;gt;&#xA;&amp;lt;*&amp;gt;   Xen network device frontend driver&#xA;...&#xA;Character devices  ---&amp;gt;&#xA;[*] Xen Hypervisor Console support&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now we&amp;rsquo;re nearly done with it. After compiling the kernel we need to do some small changes concerning the console redirection in the baselayout of the Linux guest. In the future the distributions will likely prepare this for us.&lt;/p&gt;&#xA;&lt;p&gt;Add hvc0 device node:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;root # cd /dev&#xA;root # mknod hvc0 c 229 0&#xA;root # chown root:tty hvc0&#xA;root # chmod 600 hvc0&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To change default console to hvc0 you have to edit the &lt;em&gt;/etc/inittab&lt;/em&gt;. If not done already, disable all the other virtual consoles:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;co:12345:respawn:/sbin/agetty 38400 hvc0 vt100-nav&#xA;#2:23:respawn:/sbin/agetty 38400 tty2&#xA;#3:23:respawn:/sbin/agetty 38400 tty3&#xA;...&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Finally permit login on the hvc0 console by adding it to &lt;em&gt;/etc/securetty&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Now we should be able to boot our paravirt_ops system on real hardware the same as on a Xen hypervisor. However compared with a Xen-patched paravirtualized kernel, the paravirt_ops kernel doesn&amp;rsquo;t support special features like framebuffer support or live migration.&lt;/p&gt;&#xA;&lt;p&gt;Links:&#xA;&lt;a href=&#34;http://lwn.net/Articles/194543/&#34;&gt;lwn.net - Connecting Linux to hypervisors&lt;/a&gt;&#xA;&lt;a href=&#34;https://trac.linuxmonk.ch/wiki/LinuxMonk/Xen/VanillaKernel&#34;&gt;linuxmonk.ch/trac - Building paravirt_ops domU kernel from vanilla sources&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Gentoo: QEMU in 32bit Xen environment</title>
      <link>https://blog.linuxmonk.ch/2007/gentoo-qemu-in-32bit-xen-environment/</link>
      <pubDate>Wed, 03 Oct 2007 18:13:13 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2007/gentoo-qemu-in-32bit-xen-environment/</guid>
      <description>&lt;p&gt;Recently I wanted to set up a testing server for the different virtualization techniques for Linux. For this I have an Asus P5LD2 mainboard with an Intel dual core Pentium D 3,2 GHz which supports the &lt;a href=&#34;http://www.intel.com/technology/itj/2006/v10i3/1-hardware/5-architecture.htm&#34;&gt;Virtual Machine Extensions&lt;/a&gt; (VMX). Thanks to this I can compile Xen with the &amp;lsquo;hvm&amp;rsquo;&lt;a href=&#34;http://www.gentoo-portage.com/USE&#34;&gt;USE-flag&lt;/a&gt; and run fully virtualized guest operating systems on my Xen supervisor. This means I could run nearly every i386 compatible operating system (even Windows ;-) ) in my Xen environment. Without such hardware every guest operating system has to have a Xen enabled kernel.&lt;/p&gt;&#xA;&lt;p&gt;Another approach with the same result is the open source project &lt;a href=&#34;http://wiki.qemu.org&#34;&gt;QEMU&lt;/a&gt;. Its abstraction level is higher than with Xen and it can even emulate different target architectures from your current x86 host. So far &lt;a href=&#34;http://en.wikipedia.org/wiki/X86_64&#34;&gt;x86_64&lt;/a&gt;, &lt;a href=&#34;http://en.wikipedia.org/wiki/ARM_architecture&#34;&gt;ARM&lt;/a&gt;, &lt;a href=&#34;http://en.wikipedia.org/wiki/Sparc&#34;&gt;SPARC&lt;/a&gt;, &lt;a href=&#34;http://en.wikipedia.org/wiki/Powerpc&#34;&gt;PowerPC&lt;/a&gt;, &lt;a href=&#34;http://en.wikipedia.org/wiki/MIPS_architecture&#34;&gt;MIPS&lt;/a&gt; and &lt;a href=&#34;http://en.wikipedia.org/wiki/M68k&#34;&gt;M68k&lt;/a&gt; target systems are supported. Its guest operating system does not need any single change to run on QEMU. This makes it very comfortable to test new live CDs or operating system images. But it is not so trivial to setup QEMU and Xen together on a Gentoo machine.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;How to setup QEMU on 32bit Gentoo in Xen dom0?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;If you compile Xen on a 32bit host you have to add &amp;lsquo;-mno-tls-direct-seg-refs&amp;rsquo; to your CFLAGS. That is because the glibc TLS library is implemented in a way that will conflict with how Xen uses segment registers. For compiling the non-patched QEMU 0.9.0 you have to use a gcc version 3.x. The nowadays default gcc 4.x is not yet supported. After several compile failures I finally found to setup QEMU the following way:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;1.&lt;/strong&gt; For compiling gcc-3.x remove the &amp;lsquo;-mno-tls-direct-seg-refs&amp;rsquo; from &lt;em&gt;/etc/make.conf&lt;/em&gt; and set the &amp;rsquo;nossp&amp;rsquo; and &amp;rsquo;nopie&amp;rsquo; USE-flags. Otherwise gcc or later qemu will not compile.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;2.&lt;/strong&gt; Switch to gcc-3.x before compiling &lt;a href=&#34;http://www.gentoo-portage.com/app-emulation/qemu-softmmu&#34;&gt;qemu-softmmu&lt;/a&gt;, &lt;a href=&#34;http://www.gentoo-portage.com/app-emulation/qemu-user&#34;&gt;qemu-user&lt;/a&gt; and &lt;a href=&#34;http://www.gentoo-portage.com/app-emulation/qemu&#34;&gt;qemu&lt;/a&gt;. In my case it&amp;rsquo;s: &lt;code&gt;gcc-config i686-pc-linux-gnu-3.3.6&lt;/code&gt; &lt;strong&gt;3.&lt;/strong&gt; Check your CFLAGS again because the optimization flags for gcc 4.x are not always backwards compatible to gcc-3.x. In my case the &lt;em&gt;make.conf&lt;/em&gt; looks like this:&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# gcc-3.x&#xA;CFLAGS=&amp;#34;-march=pentium4 -O2 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs&amp;#34;&#xA;&#xA;# gcc-4.x for compiling gcc-3.3&#xA;#CFLAGS=&amp;#34;-march=prescott -O2 -pipe -fomit-frame-pointer&amp;#34;&#xA;&#xA;# gcc-4.x&#xA;#CFLAGS=&amp;#34;-march=prescott -O2 -pipe -fomit-frame-pointer -mno-tls-direct-seg-refs&amp;#34;&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;4.&lt;/strong&gt; Now you can compile QEMU. Do not forget to switch back to your original CFLAGS and gcc-4.x after successfully emerging QEMU. I recommend to you to also build the QEMU kernel accelerator module &lt;a href=&#34;http://www.gentoo-portage.com/app-emulation/kqemu&#34;&gt;kqemu&lt;/a&gt; which has to be compiled with the same compiler as the kernel itself.&lt;/p&gt;&#xA;&lt;p&gt;Now Xen and QEMU are able to run whatever operating system image you give them. Have fun with playing around&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;Additional links:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://en.gentoo-wiki.com/wiki/Xen&#34;&gt;gentoo-wiki.com - Xen&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://wiki.xensource.com/xenwiki/HVM_Compatible_Processors&#34;&gt;wiki.xensource.com - HVM Compatible Processors&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://en.gentoo-wiki.com/wiki/QEmu&#34;&gt;gentoo-wiki.com - QEmu&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
    </item>
    
    <item>
      <title>DokuWiki - A small Wiki for everyday use</title>
      <link>https://blog.linuxmonk.ch/2007/dokuwiki-a-small-wiki-for-everyday-use/</link>
      <pubDate>Wed, 26 Sep 2007 18:38:45 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2007/dokuwiki-a-small-wiki-for-everyday-use/</guid>
      <description>&lt;p&gt;For organizing our move to the shared flat I was looking for a small, simple to use &lt;a href=&#34;http://en.wikipedia.org/wiki/Wiki&#34;&gt;Wiki&lt;/a&gt; for collecting ideas and coordinating our flat inventory. After a little search I found &lt;a href=&#34;http://wiki.splitbrain.org/wiki:dokuwiki&#34;&gt;DokuWiki&lt;/a&gt;. It can be easily installed by every Linux distribution&amp;rsquo;s package manager. Unfortunately the stable &lt;a href=&#34;http://www.debian.org&#34;&gt;Debian&lt;/a&gt; package was not the newest version and annoyed me with banners that there are some upgrades available. So I tried again with the newest version from the developers site. After unpacking, the directory has to be made accessible through your Web server and after running the install.php where you actually only create the administrator user, the Wiki is already prepared to use. In the default configuration there is no database needed. But the strength of this Wiki is that it can be expanded by more sophisticated configurations using &lt;a href=&#34;http://www.mysql.com&#34;&gt;MySQL&lt;/a&gt; or an &lt;a href=&#34;http://en.wikipedia.org/wiki/Ldap&#34;&gt;LDAP&lt;/a&gt; back-end for user administration. The syntax is quite simple and similar to other Wiki systems. Also my friends were surprised by the usability of this piece of Open Source software. So if you are planning to use a powerful but simple Wiki software, keep an eye on DokuWiki.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Finally I have my own public IP</title>
      <link>https://blog.linuxmonk.ch/2007/finally-i-have-my-own-public-ip/</link>
      <pubDate>Tue, 18 Sep 2007 16:05:59 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2007/finally-i-have-my-own-public-ip/</guid>
      <description>&lt;p&gt;This information is for all of you quite boring I know, but it is a happy thing for me. Finally my Xen domain, where I am hosting this Web site, has its own static public IP (193.138.215.129). Now I am ready for running all possible Internet services depending how I feel like. My first plan will be an own mail server with &lt;a href=&#34;http://www.qmail.org&#34;&gt;qmail&lt;/a&gt;. I am open about some tricks and hints about this. I eventually also found a domain name that suits for this site. When I do not change my mind again, the blog will be soon available under &lt;a href=&#34;http://www.linuxmonk.ch&#34;&gt;http://www.linuxmonk.ch&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;There is a lot changing in my life at the moment so stay tuned for some more news later&amp;hellip;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Open Source Instant Messaging with GoogleTalk</title>
      <link>https://blog.linuxmonk.ch/2007/open-source-instant-messaging-with-googletalk/</link>
      <pubDate>Thu, 16 Aug 2007 08:39:51 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2007/open-source-instant-messaging-with-googletalk/</guid>
      <description>&lt;p&gt;Most of you may have a similar problem. A lot of friends are present in the Internet but all of them use a different instant messenger. There are &lt;a href=&#34;http://icq.com/&#34;&gt;ICQ&lt;/a&gt;, &lt;a href=&#34;http://www.msn.com/&#34;&gt;MSN&lt;/a&gt;, &lt;a href=&#34;http://messenger.yahoo.com/&#34;&gt;Yahoo Messenger&lt;/a&gt;, &lt;a href=&#34;http://www.jabber.org/&#34;&gt;Jabber&lt;/a&gt; and a lot more. With multi-protocol messenger like &lt;a href=&#34;http://www.pidgin.im/&#34;&gt;Pidgin&lt;/a&gt; (former &lt;a href=&#34;http://sourceforge.net/projects/gaim/&#34;&gt;Gaim&lt;/a&gt;) or &lt;a href=&#34;http://www.adiumx.com/&#34;&gt;Adium&lt;/a&gt; it is not that laborious to manage all your contacts anymore. But still you would like to reduce your number of accounts as much as possible.&lt;/p&gt;&#xA;&lt;p&gt;Once more open source software gives an example how it could be. The protocol is called &lt;a href=&#34;http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol&#34;&gt;XMPP&lt;/a&gt; and originally used by Jabber. When &lt;a href=&#34;http://www.google.com&#34;&gt;Google&lt;/a&gt; introduced their own messenger &lt;a href=&#34;http://www.google.com/talk/&#34;&gt;GoogleTalk&lt;/a&gt; in 2005 they made the wise decision to also use XMPP instead of inventing a new protocol. The next big thing is that everybody with a &lt;a href=&#34;http://mail.google.com&#34;&gt;Gmail&lt;/a&gt; account can also use this credentials for GoogleTalk. One account connects you to your friends of two networks. Why is not everything in information technology so handy?&lt;/p&gt;&#xA;&lt;p&gt;Now you are maybe wondering that Gaim/Pidgin does not support GoogleTalk. But it does support Jabber/XMPP. So it is an easy thing to set up your GoogleTalk account. Enter your Gmail address as &amp;ldquo;Screen Name&amp;rdquo;; the server is not &amp;ldquo;jabber.org&amp;rdquo; but &amp;ldquo;gmail.com&amp;rdquo; and the connect server is &amp;ldquo;talk.google.com&amp;rdquo;. As resource you can leave &amp;ldquo;Home&amp;rdquo;. Finished and ready for chatting&amp;hellip;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Arming against SSH Attacks</title>
      <link>https://blog.linuxmonk.ch/2007/arming-against-ssh-attacks/</link>
      <pubDate>Tue, 24 Jul 2007 20:53:26 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2007/arming-against-ssh-attacks/</guid>
      <description>&lt;p&gt;I think everybody that runs an own Linux server with the &lt;a href=&#34;http://en.wikipedia.org/wiki/Secure_Shell&#34;&gt;SSH&lt;/a&gt; daemon listening on port 22 is sooner or later annoyed by the amount of password attacks done by bots somewhere out in the Internet. What can you do against it?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Blocking via iptables &amp;lsquo;recent&amp;rsquo; module&lt;/strong&gt;&#xA;How you can do this on a Gentoo system is described in the Gentoo Wiki &lt;a href=&#34;http://gentoo-wiki.com/HOWTO_Protect_SSHD_with_IP_Tables&#34;&gt;here&lt;/a&gt;. Because it blocks the connection attempt only due to the number of tries within a certain time it is a very basic solution and needs quite a lot of testing to examine the good parameters for the &amp;lsquo;hitcount&amp;rsquo; and &amp;lsquo;seconds&amp;rsquo; arguments. You do not unintentionally want to block yourself when you only try to open several connections within a short time period. So not really the thing I recommend here.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Log parsing with sshguard&lt;/strong&gt; &lt;a href=&#34;http://sshguard.sourceforge.net/&#34;&gt;sshguard&lt;/a&gt; uses another approach. It parses the SSH log messages and searches for login failures. For example when you try to connect with a non-existent user sshguard catches it and creates an iptables deny rule. But also sshguard has a small design mistake. It wants you to create a &lt;code&gt;sshguard&lt;/code&gt; chain in iptables and redirect all the traffic to the chain assuming that your default &lt;code&gt;INPUT&lt;/code&gt; policy is &lt;code&gt;ACCEPT&lt;/code&gt;. When it wants to block a host it runs &lt;code&gt;iptables -A sshguard -s host-to-block -j DROP&lt;/code&gt;. In case you have your policy set to &lt;code&gt;DROP&lt;/code&gt; you cannot configure the iptables to accept the allowed SSH traffic because else the blocking rules will not work anymore. I made a small &lt;a href=&#34;http://ganto.no-ip.org/wp-content/uploads/2007/07/sshguard-1.0-iptables-insert.patch.txt&#34;&gt;patch&lt;/a&gt; to change the blocking command to insert the rule in first place of the chain. After you applied the patch you have to make sure that you setup your iptables the following way:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;iptables -N sshguard iptables -A sshguard -j ACCEPT iptables -A INPUT -p tcp --dport ssh -j sshguard&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Further you have to edit your system logger configuration file. Please read the &lt;a href=&#34;http://sshguard.sourceforge.net/doc/setup/setup.html&#34;&gt;documentation&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For all the lazy people I even made a &lt;a href=&#34;http://en.wikipedia.org/wiki/Ebuild&#34;&gt;Ebuild&lt;/a&gt; that also adds a second patch where you can disable the IPv6 ability of sshguard. You can find it &lt;a href=&#34;http://ganto.no-ip.org/wp-content/uploads/2007/07/sshguard-1.0-r1.tar.bz2&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Migration of Xen SMP domU</title>
      <link>https://blog.linuxmonk.ch/2007/migration-of-xen-smp-domu/</link>
      <pubDate>Mon, 09 Jul 2007 01:36:35 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2007/migration-of-xen-smp-domu/</guid>
      <description>&lt;p&gt;YES, YES, YES! Finally I made it.&lt;/p&gt;&#xA;&lt;p&gt;Since a while I am playing with the migration functionality of a Xen domU between two Xen servers. It allows to move a virtual machine without reboot between two physical machines. But my problem was: It did not hold what it promised.&lt;/p&gt;&#xA;&lt;p&gt;Trying all possible versions of &lt;a href=&#34;http://packages.gentoo.org/packages/?category=app-emulation;name=xen&#34;&gt;Xen&lt;/a&gt; and the &lt;a href=&#34;http://packages.gentoo.org/search/?sstring=xen-sources&#34;&gt;xen-sources&lt;/a&gt; in the Gentoo Portage I was able to migrate a domU but not when it was configured as &lt;a href=&#34;http://en.wikipedia.org/wiki/Symmetric_multiprocessing&#34;&gt;SMP&lt;/a&gt; machine. After I found that the kernel has to include the &lt;code&gt;CONFIG_HOTPLUG_CPU&lt;/code&gt; option, I was able to migrate the domU at least one time from one host to the other. When repeating this procedure the domU crashed with a kernel oops. By finally trying the latest Xen 3.1 version from the unofficial &lt;a href=&#34;http://thestonertree.com/layman.txt&#34;&gt;mescalito&lt;/a&gt; portage overlay with the xen-sources-2.6.18, repeated migration of a domU between the Xen servers does work now. Prerequisite is that both dom0 and domU run the 2.6.18 kernel. I am trying to run this in production now and will see how reliable it is.&lt;/p&gt;&#xA;&lt;p&gt;I just remember that I did also remove the memory restriction from the dom0. The &lt;code&gt;dom0_mem&lt;/code&gt; parameter in the grub configuration is optional and when omitting it the dom0 can use the unused memory for itself.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Parallel Port in Xen domU</title>
      <link>https://blog.linuxmonk.ch/2007/parallel-port-in-xen-domu/</link>
      <pubDate>Sat, 07 Jul 2007 19:00:20 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2007/parallel-port-in-xen-domu/</guid>
      <description>&lt;p&gt;For my home server I wanted to act a Xen &lt;a href=&#34;http://wiki.xensource.com/xenwiki/DomU&#34;&gt;domU&lt;/a&gt; as &lt;a href=&#34;http://www.cups.org/&#34;&gt;CUPS&lt;/a&gt; printing server. Therefore I needed access to my parallel printer connected to the Xen server. How are I/O-ports handled in Xen?&lt;/p&gt;&#xA;&lt;p&gt;The I/O-addresses of the devices which can be found with &lt;code&gt;cat /proc/ioports&lt;/code&gt; can be redirected from the Xen dom0. You have to enter the address range of the device you want to use in a domU in their configuration file ( &lt;em&gt;/etc/xen/domain-config&lt;/em&gt;). For my parallel port it would be:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;ioports = [ &#39;0278-027a&#39; ]&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Further I make sure that my dom0 does not access the device by removing parallel port support in the kernel configuration. When you boot then a domU kernel with parallel port and printer support it can access the device natively. Here a cut out from &lt;code&gt;dmesg&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;parport0: PC-style at 0x278 [PCSPP,TRISTATE] parport0: Printer, Hewlett-Packard HP LaserJet 6P lp0: using parport0 (polling).&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;In CUPS the printer is now accessible under /dev/lp0.&lt;/p&gt;&#xA;&lt;p&gt;Unfortunately the documentation about this feature of Xen is a little bit rare. Another interesting thing is the redirection of PCI devices to a domU. Unfortunately I did not test this at my setup yet. I hope to come back to this topic later. For your creativity here some more examples from the net:&#xA;&lt;a href=&#34;http://www.dulug.de/cgi-bin/dcms.cgi?action=showmail&amp;amp;mail=793&#34;&gt;dulug.de - serielle Schnittstelle mit XEN&lt;/a&gt;&#xA;&lt;a href=&#34;http://wiki.xensource.com/xenwiki/Assign_hardware_to_DomU_with_PCIBack_as_module?highlight=%28pci%29&#34;&gt;wiki.xensource.com - Assign hardware to DomU with PCI Backend as module&lt;/a&gt;&#xA;&lt;a href=&#34;http://scotthadfield.ca/?p=149&#34;&gt;PCI Delegation in Xen&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Powered by Xen and Debian Linux</title>
      <link>https://blog.linuxmonk.ch/2007/powered-by-xen-and-debian-linux/</link>
      <pubDate>Wed, 27 Jun 2007 00:58:41 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2007/powered-by-xen-and-debian-linux/</guid>
      <description>&lt;p&gt;Finally I&amp;rsquo;m back once more ;-) . While I was in military service my Zyxel modem suddenly refused to work with my &lt;a href=&#34;http://www.fli4l.de&#34;&gt;fli4l&lt;/a&gt; router what caused me to switch the modem into router mode and this made it impossible to further access my Web server. That&amp;rsquo;s the reason for the downtime. It&amp;rsquo;s very embarrassing that I only write into my blog when there was a service failure before. But this time this should change!&lt;/p&gt;&#xA;&lt;p&gt;I moved my Web site from my home server to a machine in a hosting center. Together with some friends we were sharing a physical machine with different &lt;a href=&#34;http://www.xensource.com/&#34;&gt;Xen&lt;/a&gt; domains. Generally I did a lot of work with Xen recently therefore I hope to enjoy you with some tricks about it soon. In my Xen domain the new Debian 4.0 Etch is running. With help of &lt;a href=&#34;http://packages.qa.debian.org/d/debootstrap.html&#34;&gt;debootstrap&lt;/a&gt; it is installed in a few minutes. By the way&amp;hellip; does someone know the successor of the &lt;code&gt;base-config&lt;/code&gt; program in the earlier versions?&lt;/p&gt;&#xA;&lt;p&gt;Anyway I hope that the site can stay here for a while and you will come back when there are some more news.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Webtipps - 19. September 2006</title>
      <link>https://blog.linuxmonk.ch/2006/webtipps-19-september-2006/</link>
      <pubDate>Tue, 19 Sep 2006 01:26:50 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/webtipps-19-september-2006/</guid>
      <description>&lt;p&gt;damnsmalllinux.org: &lt;a href=&#34;http://www.damnsmalllinux.org/income-guide/&#34;&gt;A guide to earning an income from a Free and Open Source project&lt;/a&gt;&#xA;debianhelp.co.uk: &lt;a href=&#34;http://www.bloglines.com/blog/debianhelp?id=69&#34;&gt;Debian Network Utilities and Tools with Examples&lt;/a&gt;&#xA;heise.de: &lt;a href=&#34;http://www.heise.de/security/artikel/76617&#34;&gt;Kommentar: Qualität durch Zufall&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Neues vom Firefox</title>
      <link>https://blog.linuxmonk.ch/2006/neues-vom-firefox/</link>
      <pubDate>Sun, 10 Sep 2006 02:55:57 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/neues-vom-firefox/</guid>
      <description>&lt;p&gt;An den verschiedensten Enden gab es in letzter Zeit Neuigkeiten über den Open Source Internet Browser Firefox. Um die schlechte Nachricht schon einmal vorwegzunehmen, der &lt;a href=&#34;http://wiki.mozilla.org/Firefox2/HistoricalSchedule&#34;&gt;Releasetermin von Firefox 2.0&lt;/a&gt;, welcher im August 2006 angesetzt war, konnte nicht eingehalten werden. Dafür hat sich die &lt;a href=&#34;http://lug.oregonstate.edu/&#34;&gt;Oregon State University Linux User Group&lt;/a&gt; etwas einfallen lassen und einen &lt;a href=&#34;http://lug.oregonstate.edu/index.php/Projects/Firefox/Firefox_Circle&#34;&gt;Kornkreis in Form des Firefox Logos&lt;/a&gt; getrampelt.&lt;/p&gt;&#xA;&lt;p&gt;Auch die Leute bei Mozilla selber sorgen dafür, dass das Warten auf die nächste Firefox Version nicht langweilig wird und verspricht jedem Firefox Benutzer, der noch bis am 15. September einen &lt;a href=&#34;http://www.worldfirefoxday.com/en/&#34;&gt;Neubenutzer gewinnen&lt;/a&gt; kann, dass deren Namen in der 2.0 Version des Programms verewigt wird. Damit sich nicht nur die Verbreitung des Browsers sondern auch dessen Kundennähe vergrössert, wurde im August eine Umfrage über die gewünschten Features anderer Browser durchgeführt. Die &lt;a href=&#34;http://labs.mozilla.com/&#34;&gt;Auswertung&lt;/a&gt; ergab als wünschenswertesten Punkt eine integrierte PDF Engine wie im &lt;a href=&#34;http://www.apple.com/macosx/features/safari/&#34;&gt;Apple Safari&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Dass sich das Projekt auf dem richtigen Weg befindet, zeigte im Juli der &lt;a href=&#34;http://www.spreadfirefox.com/node/24503&#34;&gt;200 Millionste Download&lt;/a&gt; von Firefox. &lt;a href=&#34;http://www.computerbase.de/news/software/browser/2006/juni/intern_firefox_vormarsch/&#34;&gt;Computerbase&lt;/a&gt; zeigt schliesslich, dass er nicht nur heruntergeladen, sondern vor allem von interessierten Computerbenutzern rege genutzt wird. Mit knapp 57% kann sich der Open Source Browser recht deutlich gegen den Microsoft Internet Explorer (35%) und Opera (6%) durchsetzen.&lt;/p&gt;&#xA;&lt;p&gt;Und als richtiges Schmankerl zum Schluss gibt jetzt auch noch die &lt;a href=&#34;http://www.mozillazine.org/talkback.html?article=20066&#34;&gt;Firefox 2.0 Beta 2&lt;/a&gt;. Erstmals sind jetzt auch Änderungen in der grafischen Oberfläche sichtbar. Für die neue Version wurde ein neues Theme erstellt. Neue glossy-like Icons, sowie Tabs, die schattiert werden, wenn sie im Hintergrund sind, soll die Übersicht verbessern. Hie und da sind aber nach meinem Geschmack noch einige Verbesserungen anzubringen. Wie schon &lt;a href=&#34;http://ganto.no-ip.org/?p=17&#34;&gt;früher&lt;/a&gt; erwähnt, besitzt jedes Tab einen eigenen Close-Button. Beim Starten wird zudem gefragt, ob man die Tabs der letzten Sitzung wieder herstellen soll. Die RSS Integration sowie das Extensions (neuerdings &amp;ldquo;Add-ons&amp;rdquo;) Menu wurden überarbeitet. Etwas sehr sinnvolles Neues ist die Rechtschreibeprüfung für Eingabefelder in Webseiten. Bisher hatte ich noch keine Probleme mit der Beta 2 und so kann ich allen, die schon jetzt die neuen Features ausprobieren wollen, empfehlen, diese Version zu installieren. Sonst bleibt nur das Warten auf den &lt;a href=&#34;http://www.heise.de/newsticker/meldung/76999&#34;&gt;nächsten offiziellen Releasetermin&lt;/a&gt;, welcher nun auf den 24. Oktober lautet.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Neues von Apple</title>
      <link>https://blog.linuxmonk.ch/2006/neues-von-apple/</link>
      <pubDate>Mon, 07 Aug 2006 19:53:28 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/neues-von-apple/</guid>
      <description>&lt;p&gt;Heute hatte Steve Jobs seinen grossen Auftritt an der alljährlichen Apple &lt;a href=&#34;http://developer.apple.com/wwdc/&#34;&gt;Worldwide Developers Conference (WWDC 2006)&lt;/a&gt;. Dabei wurde der Nachfolger des Apple Flaggschiffs PowerMac, der &lt;a href=&#34;http://www.apple.com/macpro/&#34;&gt;Mac Pro&lt;/a&gt; vorgestellt. Ab CHF 3599.- gibt es eine Dual Intel Xeon 2.66 GHz &amp;ldquo;Woodcrest&amp;rdquo; (neue Core Architektur!) Workstation mit 1GB DDR2-667MHz Arbeitsspeicher und einer Nvidia Geforce 7300 GT Grafikkarte. Ebenfalls vorgestellt wurden einige Details zum Mac OS X 10.5 Leopard, welches im Frühjahr 2007 ausgeliefert werden soll. So gibt es neu beispielsweise einen automatischen Backup-Mechanismus &amp;ldquo;Time Machine&amp;rdquo;, eine virtuelle Desktop-Verwaltung &amp;ldquo;Spaces&amp;rdquo; sowie diverse Updates zu bereits bekannten Apple Programmen wie Mail, iChat, Dashboard, Photo Booth, Front Row und Spotlight.&lt;/p&gt;&#xA;&lt;p&gt;Ich bin ja eigentlich schon ein OS X Fan, seit ich mein erstes Apple iBook gekauft habe und mit jeder neuen Version von OS X, werde ich überzeugter. Microsoft versucht durch Biegen und Brechen ein völlig neues Betriebssystemgefühl zu kreieren. Doch leider haben sie sich zünftig übernommen (computerbase.de: &lt;a href=&#34;http://www.computerbase.de/news/software/betriebssysteme/windows/2006/august/microsoft_fehler_vista-entwicklung/&#34;&gt;Microsoft gibt Fehler bei Vista-Entwicklung zu&lt;/a&gt;). Apple dagegen schafft durch konstante Evaluation, Entwicklung und Verbesserungen das optimale System für alle normalen Computeranwender. Wann merken die das endlich?&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Quelle:&lt;/strong&gt; mactechnews.de: &lt;a href=&#34;http://www.mactechnews.de/wwdc2006ticker/index.html&#34;&gt;WWDC 2006 Live Ticker&lt;/a&gt; &lt;strong&gt;Update - 9. August 2006:&lt;/strong&gt; Nun ist auch die &lt;a href=&#34;http://events.apple.com.edgesuite.net/aug_2006/event/index.html&#34;&gt;Keynote&lt;/a&gt; der WWDC 2006 online. Anklicken und Zurücklehnen&amp;hellip; Auch Apple macht sich übrigens recht ausdrücklich lustig über Windows Vista. Das darf man nicht verpassen!&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Webtipps - 5. August 2006</title>
      <link>https://blog.linuxmonk.ch/2006/webtipps-5-august-2006/</link>
      <pubDate>Sat, 05 Aug 2006 01:43:58 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/webtipps-5-august-2006/</guid>
      <description>&lt;p&gt;heise.de: &lt;a href=&#34;http://www.heise.de/open/artikel/69999&#34;&gt;Wo bleibt der Linux Desktop?&lt;/a&gt;&#xA;ibm.com: &lt;a href=&#34;http://www-128.ibm.com/developerworks/linux/library/l-threading.html?ca=dgr-lnxw07LinuxThreadsAndNPTL&#34;&gt;Linux threading models compared: LinuxThreads and NPTL&lt;/a&gt;&#xA;linuxworld.com.au: &lt;a href=&#34;http://www.linuxworld.com.au/index.php/id;1480540357;fp;4;fpid;4&#34;&gt;Forget about open source at Apple&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Debian Server durch Kernel-Schwachstelle komprimitiert</title>
      <link>https://blog.linuxmonk.ch/2006/debian-server-durch-kernel-schwachstelle-komprimitiert/</link>
      <pubDate>Thu, 13 Jul 2006 23:13:39 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/debian-server-durch-kernel-schwachstelle-komprimitiert/</guid>
      <description>&lt;p&gt;Die kürzlich gefundene Kernel-Schwachstelle &lt;a href=&#34;http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-2451&#34;&gt;CVE-2006-2451&lt;/a&gt; der Kernel &amp;gt;2.6.13 und &amp;lt;2.6.16.24 und &amp;lt;2.6.17.4, wodurch ein entfernter Angreifer root-Privilegien erhalten kann, wurde am prominenten Beispiel des Debian Entwicklungsservers &lt;a href=&#34;http://db.debian.org/machines.cgi?host=gluck&#34;&gt;Gluck&lt;/a&gt; demonstriert. Dank der schnellen Reaktion der Administratoren wurde nur /bin/ping komprimitiert. Sonst wurden noch keine veränderten Daten/Packete oder Programme entdeckt. Das zeigt wieder einmal, dass man als Administrator gut dran tut seine Kernelversionen aktuell zu halten und die Maschinen genau zu überwachen.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Quelle:&lt;/strong&gt; debian.org: &lt;a href=&#34;http://www.debian.org/News/2006/20060713&#34;&gt;Debian Server restored after Compromise&lt;/a&gt; &lt;strong&gt;Update - 7. August 2006:&lt;/strong&gt; Für alle, welche noch einen der betroffenen Kernel auf einem produktiven System einsetzen, der Standardkernel (2.6.8) von Debian Sarge ist übrigens nicht betroffen, gibt es ein Workaround: &lt;a href=&#34;http://www.debian-administration.org/articles/418&#34;&gt;Mitigating against recent GNU/Linux kernel bugs&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Spam gibts nicht nur im Email</title>
      <link>https://blog.linuxmonk.ch/2006/spam-gibts-nicht-nur-im-email/</link>
      <pubDate>Wed, 28 Jun 2006 23:52:29 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/spam-gibts-nicht-nur-im-email/</guid>
      <description>&lt;p&gt;Vielleicht ist es schon jemandem aufgefallen. Ganz unten auf der Seite ist eine Statuszeile von &lt;a href=&#34;http://unknowngenius.com/blog/wordpress/spam-karma/comment-page-1/&#34;&gt;Spam Karma 2&lt;/a&gt; einem Programm, welches dieses &lt;a href=&#34;http://wordpress.org/&#34;&gt;WordPress&lt;/a&gt;-Blog von ungewollten Einträgen schützt. Seit ich dieses SK2 Plugin vor genau einer Woche installiert habe, sind jetzt sage und schreibe bereits 124 Spam Einträge gefiltert worden. Nein, ich habe definitiv keine Lust, dass jemand auf meiner Seite mit zwielichtigen Sachen wirbt. Die geposteten Links müssen aber nicht immer nur auf Werbeangebote führen. Im schlimmeren Fall haben sie auf ihrer Zielseite Code eingebaut, um durch eine Browserschwachstelle ungewollte Programme zu installieren. Ich möchte nicht unerwähnt lassen, dass der &lt;a href=&#34;http://secunia.com/product/11/&#34;&gt;Internet Explorer&lt;/a&gt; immer noch Angriffsziel Nummer eins ist und daher nicht als bevorzugter Browser gewählt werden sollte. Diese Spameinträge werden dann schliesslich auch von solchen ungewollten Programmen gemacht, sogenannten Spam Bots. Das macht die Filterung relativ einfach. Beispielsweise wird auf die Zeit geschaut, welche verstreicht nach dem Aufrufen der Seite bis zum Abschicken des Kommentars. Nun kommen wir aber zum eigentlichen Problem, nämlich der Ursache dieser Bots. Und schon sind wir wieder einmal bei Windows angelangt. Leider ist dieses Betriebssystem für die meisten Benutzer so einfach zu bedienen, dass sie keine weiteren Ansprüche stellen sich tiefer mit der Materie auseinander zu setzen, was bei Windows leider eindeutig nötig wäre&amp;hellip; hier haben wir jetzt den Mist. Merci&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Windows Media Components auch unter Intel Mac</title>
      <link>https://blog.linuxmonk.ch/2006/windows-media-components-auch-unter-intel-mac/</link>
      <pubDate>Sat, 24 Jun 2006 23:40:13 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/windows-media-components-auch-unter-intel-mac/</guid>
      <description>&lt;p&gt;Vor einiger Zeit habe ich berichtet, wie man ohne Windows Media Player die neusten .wmv Codecs installiert (&lt;a href=&#34;http://ganto.no-ip.org/?p=18&#34;&gt;Apple OS X und Windows Media Files&lt;/a&gt;). Wenn man aber versucht die Windows Media Components auf einem Intel Mac einzurichten, meldet der Installer, dass diese nicht unter dem x86 OS X laufen. Eine kompatible Version ist zwar &lt;a href=&#34;http://www.flip4mac.com/fusetalk/forum/messageview.aspx?catid=25&amp;amp;threadid=944&amp;amp;enterthread=y&#34;&gt;angekündigt&lt;/a&gt;, aber noch nicht erhältlich. Genau hier kommt jetzt &lt;a href=&#34;http://www.apple.com/de/rosetta/&#34;&gt;Rosetta&lt;/a&gt; ins Spiel. Dabei handelt es sich um einen im Apple OS X integrierten Binary Translator, welcher ermöglicht, Programme welche für die PowerPC Architektur kompiliert wurden, auch auf Intel Macs laufen zu lassen. In unserem Fall wenden wir ihn auf den Installer an, welcher das &amp;ldquo;Flip4Mac WMV.mpkg&amp;rdquo; installiert. d.h. Rechtsklick auf /Applications/Utilities/Installer. Dann auf &amp;ldquo;Get Info&amp;rdquo; und dort &amp;ldquo;Open with Rosetta&amp;rdquo;. Danach können wir die Windows Media Components wie gewohnt installieren. Nun muss man natürlich auch noch den QuickTime Player unter Rosetta laufen lassen und kann dann sämtliche Windows Media Files auch auf seinem Intel Mac geniessen.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Quelle:&lt;/strong&gt; OSNews.org: &lt;a href=&#34;http://www.osnews.com/story.php?news_id=13902&#34;&gt;How to Get Your Intel Mac to Play WMV Files&lt;/a&gt; &lt;strong&gt;Update - 7. August 2006:&lt;/strong&gt; Mittlerweile ist die Version 2.1 der Windows Media Components for Quicktime herausgekommen, welche auch nativ unter Intel Macs funktioniert: &lt;a href=&#34;http://www.flip4mac.com/wmv_download.htm&#34;&gt;Flip4Mac WMV 2.1&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Last Exit...</title>
      <link>https://blog.linuxmonk.ch/2006/last-exit/</link>
      <pubDate>Wed, 14 Jun 2006 23:57:33 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/last-exit/</guid>
      <description>&lt;p&gt;&amp;hellip;ist nicht nur ein bekanntes &lt;a href=&#34;http://www.lastexitflucht.org/againstallodds/&#34;&gt;Browsergame der UNHCR&lt;/a&gt; (Flüchtlingskommissariat der Vereinten Nationen), sondern auch ein &lt;a href=&#34;http://www.gtk.org/&#34;&gt;GTK+&lt;/a&gt; basierter Player für den &lt;a href=&#34;http://www.gnome.org/&#34;&gt;Gnome&lt;/a&gt;-Desktop zum Empfang von &lt;a href=&#34;http://last.fm&#34;&gt;last.fm&lt;/a&gt; Radio-Streams. Die Sourcen gibt es &lt;a href=&#34;http://www.o-hand.com/~iain/last-exit/&#34;&gt;hier&lt;/a&gt; zum Download. Installiert wird Last Exit wie gewohnt mit &lt;code&gt;./configure &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;/code&gt;. Falls es noch zu Problemen mit GConf kommt, kann man im &lt;a href=&#34;http://www.ubuntuforums.org/showthread.php?t=149018&#34;&gt;Ubuntu-Forum&lt;/a&gt; nachlesen, wie diese zu beheben sind. Im Gegensatz zum offiziellen &lt;a href=&#34;http://www.trolltech.com/products/qt&#34;&gt;QT&lt;/a&gt;-basierten &lt;a href=&#34;http://www.last.fm/downloads.php?showplatform=Linux&#34;&gt;Last.fm Player&lt;/a&gt; funktioniert Last Exit jedoch noch nicht so zuverlässig. Bei mir verabschiedet er sich ab und zu mit einem Segmentation Fault. Auch ist die persönliche Radiostation ausgegraut und kann nicht angewählt werden. Aber für alle, die ihre Gnome Installation nicht mit QT belasten wollen, ist Last Exit trotzdem noch eine brauchbare Alternative.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;http://ganto.no-ip.org/wp-content/uploads/2006/06/last_exit.png&#34; alt=&#34;last exit screenshot&#34;&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Gratis TV im Internet... alle WM Matchs Live!</title>
      <link>https://blog.linuxmonk.ch/2006/gratis-tv-im-internet-alle-wm-matchs-live/</link>
      <pubDate>Sun, 11 Jun 2006 14:43:58 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/gratis-tv-im-internet-alle-wm-matchs-live/</guid>
      <description>&lt;p&gt;Was macht man, wenn man WM schauen will, aber kein Fernseher in Sichtweite hat? Genau, man setzt sich an den Computer und schaut, was man denn dem Internet alles entlocken kann. Und wird auch fündig. In meinem Fall bei &lt;a href=&#34;http://www.tvants.com&#34;&gt;TVants&lt;/a&gt;. Das ganze ist ein P2P-Streaming-Netzwerk, an welches verschiedene Fernsehsender angeschlossen sind und welches sich vor für Sportübertragungen sehr gut eignet. Nach dem Installieren einer Clientapplikation (&lt;a href=&#34;http://mirror.tvants.com/download/TvantsSetup.exe&#34;&gt;TvantsSetup.exe&lt;/a&gt;), welches leider nur für Windows erhältlich ist, wählt man aus den verfügbaren Sendern aus und nach einer längeren Bufferingphase, hat man auch schon das Livebild auf dem Computerschirm. Trotz meiner 2000 Kbit/s Leitung gibt es leider viele Bufferingphasen, was natürlich immer davon abhängt, wieviele Leute gleichzeitig auch diesen Sender schauen.&#xA;Das ganze ist bisher wohl eher in Asien verbreitet, so gibt es vor allem asiatische TV Stationen, welche ihre Sendungen in das Netzwerk einspeisen. Aber unter anderem ist auch Eurosport France dabei.&lt;/p&gt;&#xA;&lt;p&gt;Wichtige Links:&#xA;&lt;a href=&#34;http://translate.google.com/translate?u=http%3A%2F%2Ftvants.com&amp;amp;langpair=zh-CN%7Cen&amp;amp;hl=es&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;prev=%2Flanguage_tools&#34;&gt;tvants.com (übersetzt)&lt;/a&gt; - Übersicht der an TVants beteiligten Sender&#xA;&lt;a href=&#34;http://www.football4less.com/streams/tvants.html&#34;&gt;www.football4less.com/&amp;hellip;&lt;/a&gt; - Installations-Tipps für TVants&#xA;&lt;a href=&#34;http://www.fussball-foren.net/fussball-live.html#live&#34;&gt;www.fussball-foren.net/&amp;hellip;&lt;/a&gt; - Übersicht der WM-Spiele in Streaming Netzwerken (u.a. TVants)&#xA;&lt;a href=&#34;http://tvmix.net/&#34;&gt;tvmix.net&lt;/a&gt; - Übersicht von Sportübertragungen auf TVants kompatiblen Stationen&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Webtipps - 31. März 2006</title>
      <link>https://blog.linuxmonk.ch/2006/webtipps-31-mrz-2006/</link>
      <pubDate>Fri, 31 Mar 2006 00:16:36 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/webtipps-31-mrz-2006/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.geekpatrol.ca&#34;&gt;www.geekpatrol.ca&lt;/a&gt;: &lt;a href=&#34;http://www.geekpatrol.ca/blog/106/&#34;&gt;MacBook Pro Running XP Geekbenched&lt;/a&gt;&#xA;chabada.sk: &lt;a href=&#34;http://chabada.sk/better-desktop/&#34;&gt;40+ Suggestions for Better Desktop&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Apple OS X und Windows Media Files</title>
      <link>https://blog.linuxmonk.ch/2006/apple-os-x-und-windows-media-files/</link>
      <pubDate>Tue, 28 Mar 2006 18:25:09 +0200</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/apple-os-x-und-windows-media-files/</guid>
      <description>&lt;p&gt;Da Microsoft ja immer ihr eigenes Süppchen kochen, ist das auch bei den Videoformaten nicht anders. Teilweise bereitet bereits das Abspielen von wmv3 codierten Videos, welche mit dem Windows Media Player 9 eingeführt wurden, Probleme auf nicht Windows Plattformen. Für Apple OS X konnte bisher nur der Windows Media Player 9 abhilfe schaffen. Doch mit dem Windows Media Player 10 hat Microsoft wieder neue Formate geschaffen und dann auch noch beschlossen den Media Player für OS X nicht mehr weiterzuführen. Somit gibt es wieder ettliche .wmv und .asf Videos, die nicht mehr mit dem Windows Media Player 9 abspielbar sind. Auch bei freien Mediaplayern, wie &lt;a href=&#34;http://mplayerosx.sourceforge.net/&#34;&gt;MPlayer&lt;/a&gt; oder &lt;a href=&#34;http://www.videolan.org/&#34;&gt;VLC&lt;/a&gt; für OS X, sucht man deren Unterstützung vergebens. Abhilfe schafft hier nur noch ein von Microsoft bereitgestelltes Plug-In für den Apple QuickTime Player. Windows Media Components for QuickTime nennt sich das ganze und ist &lt;a href=&#34;http://www.microsoft.com/downloads/details.aspx?FamilyId=915D874D-D747-4180-A400-5F06B1B5E559&amp;amp;displaylang=en&#34;&gt;hier&lt;/a&gt; erhältlich. Ein freuendes Auge, dass man endlich den Windows Media Player von seinem OS X deinstallieren kann, und ein weinendes, da offenbar immer noch die halbe Welt ihre Daten proprietären Microsoft Formaten anvertraut.&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Mozilla Firefox Alpha 1 (Bon Echo) released!</title>
      <link>https://blog.linuxmonk.ch/2006/mozilla-firefox-alpha-1-bon-echo-released/</link>
      <pubDate>Thu, 23 Mar 2006 11:33:14 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/mozilla-firefox-alpha-1-bon-echo-released/</guid>
      <description>&lt;p&gt;Die von mir am meisten verwendete Applikation ist in einer neuen Alphaversion erschienen. Die implementierten Änderungen betreffen bisher vor allem das Back-end betreffend der History und den Bookmarks des Browsers. Die auffälligste Änderung für den Benutzer sind die separaten &amp;ldquo;Close&amp;rdquo;-Buttons an den einzelnen Tabs. Laut der &lt;a href=&#34;http://www.mozilla.org/projects/firefox/roadmap.html&#34;&gt;Firefox 2.0 Roadmap&lt;/a&gt; will man die finale Version etwa mitte Sommer herausbringen. Bis dahin ist also noch viel Zeit. Wer sich schon jetzt über die zu erwartenden Neuerungen informieren will, kann das in der &lt;a href=&#34;http://wiki.mozilla.org/Firefox2/Features&#34;&gt;Firefox 2 Features-Liste&lt;/a&gt; machen. Leider wurde aber der verbesserte Downloadmanager bereits wieder von der Liste gestrichen. Wer sich nun bereits an das Preview wagen will (ich habe es natürlich schon längst getan), kann sich die passende Version vom &lt;a href=&#34;http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/bonecho/alpha1/&#34;&gt;Mozilla FTP&lt;/a&gt; herunterladen. Da dies die erste Version des 2.0 Zweigs ist, ist zu beachten, dass leider sämtliche Extensions noch nicht funktionieren.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Quelle:&lt;/strong&gt; mozillazine.org: &lt;a href=&#34;http://www.mozillazine.org/talkback.html?article=8146&#34;&gt;Bon Echo Alpha 1 Available&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>Webtipps - 2. M&amp;#228;rz 2006</title>
      <link>https://blog.linuxmonk.ch/2006/webtipps-2-mrz-2006/</link>
      <pubDate>Thu, 02 Mar 2006 17:21:38 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/webtipps-2-mrz-2006/</guid>
      <description>&lt;p&gt;arstechnica.com: &lt;a href=&#34;http://arstechnica.com/reviews/hardware/macbookpro.ars&#34;&gt;Review: Apple MacBook Pro&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
    
    <item>
      <title>ganto.no-ip.org is online again :-)</title>
      <link>https://blog.linuxmonk.ch/2006/hello-world-2/</link>
      <pubDate>Sun, 26 Feb 2006 03:03:43 +0100</pubDate>
      <guid>https://blog.linuxmonk.ch/2006/hello-world-2/</guid>
      <description>&lt;p&gt;Hallo zäme&lt;/p&gt;&#xA;&lt;p&gt;Ah, endlich hanis gschafft. Öppe eis Jahr nach mim erschte Versuech, chum ig wider mit emene Blog-/News- und Knowledgebase-System online. Das ganze wird sech i ständiger Entwicklig befinde und hoffentlech ab und zue ou mau öppis interessants für dr eint oder ander vo öich parat ha.&lt;/p&gt;&#xA;&lt;p&gt;Viu Spass wünscht dr&lt;/p&gt;&#xA;&lt;p&gt;ganto&lt;/p&gt;&#xA;</description>
    </item>
    
  </channel>
</rss>
