www.cendio.com
Bug 5324 - Upgrading to Ubuntu 14.10 breaks 4.2.0/4.3.0 installation
: Upgrading to Ubuntu 14.10 breaks 4.2.0/4.3.0 installation
Status: CLOSED FIXED
: ThinLinc
Server Installer
: 4.2.0
: PC Linux Ubuntu
: P2 Critical
: 4.4.0
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2014-10-25 08:09 by
Modified: 2015-05-12 11:26 (History)
Acceptance Criteria:


Attachments
Excerpt of the tl-setup.log (3.14 KB, text/plain)
2014-10-25 08:09, Jens Maus
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2014-10-25 08:09:51
Created an attachment (id=583) [details]
Excerpt of the tl-setup.log

As Ubuntu 14.10 has been just released I run some first tests on it and found
out that immediately after the upgrade to 14.10 our ThinLinc 4.2.0 installation
stopped working. I therefore downloaded the 4.3.0 beta 1 archive as recently
announced and tried to install that version over the old 4.2.0 version, but
unfortunately the installation stops right at trying to setup the AppArmor
configuration. In addition to that trying to start ‚vsmserver‘ also immediately
returns the following error:

— cut here — 
root@bilbo:~# /etc/init.d/vsmserver start
Starting ThinLinc vsmserver (via systemctl)
Failed to get D-Bus connection: No connection to service manager.
— cut here — 

I know that ThinLinc 4.3.0 is officially supposed to support Ubuntu 14.04 only,
but since 14.10 had been just released and is a rather minor update many people
will probably install it (like we) and it would be great if support for 14.10
could also be added before the official release of ThinLinc 4.3.0.
------- Comment #1 From 2014-10-28 17:22:33 -------
No chance to get some extra instructions how to get ThinLinc 4.3.0/4.2.0
running on Ubuntu 14.10 as well since we really don't want to wait until
ThinLInc 4.4.0 to support Ubuntu 14.10.
------- Comment #2 From cendio 2014-10-29 14:58:38 -------
Problem 1) AppArmor reload does not work:

root@ubuntu:~# /etc/init.d/apparmor reload
reload: Unknown instance: 
root@ubuntu:~# service apparmor reload
reload: Unknown instance: 


Problem 2) /usr/lib/lsb/install_initd is (again) broken:

root@ubuntu:~# /usr/lib/lsb/install_initd /etc/init.d/vsmserver 
/etc/init.d/vsmserver: $network <_io.TextIOWrapper name='/var/lib/lsb/depends'
mode='w' encoding='UTF-8'>
update-rc.d: warning: start and stop actions are no longer supported; falling
back to defaults
root@ubuntu:~# /usr/lib/lsb/install_initd /etc/init.d/ssh 
/etc/init.d/ssh: $remote_fs $syslog <_io.TextIOWrapper
name='/var/lib/lsb/depends' mode='w' encoding='UTF-8'>
update-rc.d: warning: start and stop actions are no longer supported; falling
back to defaults
update-rc.d: warning: stop runlevel arguments (0 1 6) do not match ssh
Default-Stop values (none)


Problem 3) systemctl is totally broken:

root@ubuntu:~# /etc/init.d/vsmserver start
Starting ThinLinc vsmserver (via systemctl)
Failed to get D-Bus connection: No connection to service manager.
root@ubuntu:~# service vsmserver start
Starting ThinLinc vsmserver (via systemctl)
Failed to get D-Bus connection: No connection to service manager.
root@ubuntu:~# systemctl status
Failed to get D-Bus connection: No connection to service manager.


At this point, nothing indicates that these bugs are ThinLinc bugs. We might be
able to provide workarounds though, but this might take some time.
------- Comment #3 From cendio 2014-10-29 16:14:23 -------
(In reply to comment #2)
> Problem 1) AppArmor reload does not work:
> 
> root@ubuntu:~# /etc/init.d/apparmor reload
> reload: Unknown instance: 
> root@ubuntu:~# service apparmor reload
> reload: Unknown instance: 

https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1387220
------- Comment #4 From cendio 2014-10-29 16:22:20 -------
(In reply to comment #2)

> Problem 2) /usr/lib/lsb/install_initd is (again) broken:
> 
> root@ubuntu:~# /usr/lib/lsb/install_initd /etc/init.d/vsmserver 
> /etc/init.d/vsmserver: $network <_io.TextIOWrapper name='/var/lib/lsb/depends'
> mode='w' encoding='UTF-8'>
> update-rc.d: warning: start and stop actions are no longer supported; falling
> back to defaults
> root@ubuntu:~# /usr/lib/lsb/install_initd /etc/init.d/ssh 
> /etc/init.d/ssh: $remote_fs $syslog <_io.TextIOWrapper
> name='/var/lib/lsb/depends' mode='w' encoding='UTF-8'>
> update-rc.d: warning: start and stop actions are no longer supported; falling
> back to defaults
> update-rc.d: warning: stop runlevel arguments (0 1 6) do not match ssh
> Default-Stop values (none)

Actually, it seems that the command does work. The first output line is very
confusing though, added a bug for that:
https://bugs.launchpad.net/ubuntu/+source/lsb/+bug/1387236
------- Comment #5 From cendio 2014-10-29 16:35:40 -------
(In reply to comment #2)

> Problem 3) systemctl is totally broken:
> 
> root@ubuntu:~# /etc/init.d/vsmserver start
> Starting ThinLinc vsmserver (via systemctl)
> Failed to get D-Bus connection: No connection to service manager.
> root@ubuntu:~# service vsmserver start
> Starting ThinLinc vsmserver (via systemctl)
> Failed to get D-Bus connection: No connection to service manager.
> root@ubuntu:~# systemctl status
> Failed to get D-Bus connection: No connection to service manager.

Upstream bug:

https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1387241

A workaround that seems to work is: 

# mv /bin/systemctl /bin/systemctl.broken

Then, it's possible to run tl-setup, if you skip the AppArmor step. 

After this, ThinLinc sort of works. However:

* gnome-screensaver often crashes upon login (Unity).
------- Comment #6 From 2014-10-30 20:54:47 -------
Perfect, this workaround seems to work fine. And that gnome-screensaver crashes
is no problem here since we use LXDE (Lubuntu) with xscreensaver. However,
would be great to see an updated install script since problem (1) and (3)
should be easily fixable in your installation procedures according to the
latest comments in the upstream bugreports. Unfortunately I cannot fix (1)
myself since you still obfuscate your python install scripts.
------- Comment #7 From cendio 2014-11-04 16:15:04 -------
(In reply to comment #3)
> (In reply to comment #2)
> > Problem 1) AppArmor reload does not work:
> > 
> > root@ubuntu:~# /etc/init.d/apparmor reload
> > reload: Unknown instance: 
> > root@ubuntu:~# service apparmor reload
> > reload: Unknown instance: 
> 
> https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1387220

Introduced a workaround in r29567. Workaround for pre-4.4 is:

1) Run tl-setup, answer Yes to install AppArmor configuration. 
2) After the error, run "sudo start apparmor ACTION=reload"
3) Run tl-setup again, answer No to install AppArmor configuration.
------- Comment #8 From cendio 2014-11-11 15:49:48 -------
(In reply to comment #5)
> (In reply to comment #2)
> 
> > Problem 3) systemctl is totally broken:
> > 
> > root@ubuntu:~# /etc/init.d/vsmserver start
> > Starting ThinLinc vsmserver (via systemctl)
> > Failed to get D-Bus connection: No connection to service manager.
> > root@ubuntu:~# service vsmserver start
> > Starting ThinLinc vsmserver (via systemctl)
> > Failed to get D-Bus connection: No connection to service manager.
> > root@ubuntu:~# systemctl status
> > Failed to get D-Bus connection: No connection to service manager.
> 
> Upstream bug:
> 
> https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1387241

In 29586, we are checking that "systemctl" without arguments returns true
before trying to use systemd.
------- Comment #9 From cendio 2014-11-12 09:38:04 -------
To summarize, these steps needs to be done to run 4.3.0 on Ubuntu 14.10:

1)    Install the ThinLinc packages. At the end of the installation, continue
with running "tl-setup".

2)    In the AppArmor dialog, enable AppArmor configuration. An error will
occur. Press Cancel to exit.

3)    Run the commands:

    # sudo start apparmor ACTION=reload
    # sudo sed -i -e 's,/bin/systemctl,/disabled/systemctl,g'
/opt/thinlinc/libexec/functions

4)    Run /opt/thinlinc/sbin/tl-setup. In the AppArmor dialog, disable AppArmor
configuration.

A note will be placed on https://www.cendio.com/thinlinc/docs/platforms/ubuntu.
------- Comment #10 From cendio 2015-04-24 09:53:09 -------
(In reply to comment #9)
> To summarize, these steps needs to be done to run 4.3.0 on Ubuntu 14.10:
> 
> 1)    Install the ThinLinc packages. At the end of the installation, continue
> with running "tl-setup".
> 
> 2)    In the AppArmor dialog, enable AppArmor configuration. An error will
> occur. Press Cancel to exit.
> 
> 3)    Run the commands:
> 
>     # sudo start apparmor ACTION=reload
>     # sudo sed -i -e 's,/bin/systemctl,/disabled/systemctl,g'
> /opt/thinlinc/libexec/functions
> 
> 4)    Run /opt/thinlinc/sbin/tl-setup. In the AppArmor dialog, disable AppArmor
> configuration.
> 
> A note will be placed on https://www.cendio.com/thinlinc/docs/platforms/ubuntu.

This note will be factually wrong when the release is out. Who's going to make
sure that the note is updated/removed when the release is out?
------- Comment #11 From cendio 2015-04-24 15:08:18 -------
(In reply to comment #10)
> (In reply to comment #9)
> > To summarize, these steps needs to be done to run 4.3.0 on Ubuntu 14.10:
> > 
> > 1)    Install the ThinLinc packages. At the end of the installation, continue
> > with running "tl-setup".
> > 
> > 2)    In the AppArmor dialog, enable AppArmor configuration. An error will
> > occur. Press Cancel to exit.
> > 
> > 3)    Run the commands:
> > 
> >     # sudo start apparmor ACTION=reload
> >     # sudo sed -i -e 's,/bin/systemctl,/disabled/systemctl,g'
> > /opt/thinlinc/libexec/functions
> > 
> > 4)    Run /opt/thinlinc/sbin/tl-setup. In the AppArmor dialog, disable AppArmor
> > configuration.
> > 
> > A note will be placed on https://www.cendio.com/thinlinc/docs/platforms/ubuntu.
> 
> This note will be factually wrong when the release is out. Who's going to make
> sure that the note is updated/removed when the release is out?

Whoever handles the release process will make sure this is performed.
------- Comment #12 From cendio 2015-04-24 16:20:42 -------
(In reply to comment #7)
> Introduced a workaround in r29567. 

This patch works with 14.10 but doesn't work with 15.04.

tl-setup:

> AppArmor
> ========
>
> This system is using the AppArmor access control system. A ThinLinc
> configuration needs to be loaded for some applications to operate
> correctly in this environment. Would you like to install the ThinLinc
> AppArmor configuration?
>
> Install AppArmor configuration [Yes/no]?
>
> Please wait, configuring AppArmor... failed.
>
> Could not configure AppArmor for ThinLinc.
> Please send a copy of /var/log/tlsetup.log to the ThinLinc support.
> Visit http://www.cendio.com/support for information on how to contact
> us.
>
> Press Enter to continue...


tlsetup.log:

> 2015-04-24 06:45:15,402: Configuring AppArmor...
> 2015-04-24 06:45:15,478: Output (stderr):
> 2015-04-24 06:45:15,479:     start: Unknown job: apparmor
> 2015-04-24 06:45:15,479: AppArmor configuration reload failed with error code 1
------- Comment #13 From cendio 2015-04-27 11:06:12 -------
> 
> tlsetup.log:
> 
> > 2015-04-24 06:45:15,402: Configuring AppArmor...
> > 2015-04-24 06:45:15,478: Output (stderr):
> > 2015-04-24 06:45:15,479:     start: Unknown job: apparmor
> > 2015-04-24 06:45:15,479: AppArmor configuration reload failed with error code 1

The fix in commit r29567 checks for existence of /etc/init/apparmor.conf to
control logic to use upstart instead of service script to reload apparmor
service. Ubuntu 15.04 has moved to use systemd as default but the apparmor
package still provides the file /etc/init/apparmor.conf so our check fails.

On Ubuntu 15.04 we should restart the apparmor service using the service
script instead of upstart.
------- Comment #14 From cendio 2015-04-27 13:32:05 -------
(In reply to comment #13)

> 
> The fix in commit r29567 checks for existence of /etc/init/apparmor.conf to
> control logic to use upstart instead of service script to reload apparmor
> service. Ubuntu 15.04 has moved to use systemd as default but the apparmor
> package still provides the file /etc/init/apparmor.conf so our check fails.
> 
> On Ubuntu 15.04 we should restart the apparmor service using the service
> script instead of upstart.

Apparmor version earlier than 14.10 does not use upstart and SYSV is used.
------- Comment #15 From cendio 2015-04-27 14:24:16 -------
There seems to be a way to detect if upstart is running as init system.

 Check if PID 1 owns a unix socket named @/com/ubuntu/upstart 

However, upstart v1.5 12.04 doesn't create this unix socket.
------- Comment #16 From cendio 2015-04-27 16:03:02 -------
One could also use dbus introspection to check if upstart is running:

  dbus-send --system --type=method_call --print-reply --dest=com.ubuntu.Upstart
/com/ubuntu/Upstart org.freedesktop.DBus.Introspectable.Introspect


This works correctly on 12.04, 14.04, 14.10 and 15.04, exit code reflects if
upstart is running or not.
------- Comment #17 From cendio 2015-04-30 08:50:40 -------
(In reply to comment #12)
> (In reply to comment #7)
> > Introduced a workaround in r29567. 
> 
> This patch works with 14.10 but doesn't work with 15.04.
> 
> tl-setup:
> 
> > AppArmor
> > ========
> >
> > This system is using the AppArmor access control system. A ThinLinc
> > configuration needs to be loaded for some applications to operate
> > correctly in this environment. Would you like to install the ThinLinc
> > AppArmor configuration?
> >
> > Install AppArmor configuration [Yes/no]?
> >
> > Please wait, configuring AppArmor... failed.
> >
> > Could not configure AppArmor for ThinLinc.
> > Please send a copy of /var/log/tlsetup.log to the ThinLinc support.
> > Visit http://www.cendio.com/support for information on how to contact
> > us.
> >
> > Press Enter to continue...
> 
> 
> tlsetup.log:
> 
> > 2015-04-24 06:45:15,402: Configuring AppArmor...
> > 2015-04-24 06:45:15,478: Output (stderr):
> > 2015-04-24 06:45:15,479:     start: Unknown job: apparmor
> > 2015-04-24 06:45:15,479: AppArmor configuration reload failed with error code 1

Fixed in commit 30282.
------- Comment #18 From cendio 2015-05-12 11:26:53 -------
(In reply to comment #17)
> (In reply to comment #12)
> > (In reply to comment #7)
> > > Introduced a workaround in r29567. 
> > 
> > This patch works with 14.10 but doesn't work with 15.04.
> > 
> > tl-setup:
> > 
> > > AppArmor
> > > ========
> > >
> > > This system is using the AppArmor access control system. A ThinLinc
> > > configuration needs to be loaded for some applications to operate
> > > correctly in this environment. Would you like to install the ThinLinc
> > > AppArmor configuration?
> > >
> > > Install AppArmor configuration [Yes/no]?
> > >
> > > Please wait, configuring AppArmor... failed.
> > >
> > > Could not configure AppArmor for ThinLinc.
> > > Please send a copy of /var/log/tlsetup.log to the ThinLinc support.
> > > Visit http://www.cendio.com/support for information on how to contact
> > > us.
> > >
> > > Press Enter to continue...
> > 
> > 
> > tlsetup.log:
> > 
> > > 2015-04-24 06:45:15,402: Configuring AppArmor...
> > > 2015-04-24 06:45:15,478: Output (stderr):
> > > 2015-04-24 06:45:15,479:     start: Unknown job: apparmor
> > > 2015-04-24 06:45:15,479: AppArmor configuration reload failed with error code 1
> 
> Fixed in commit 30282.

Works fine now. Great!