New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samba will not install in Debian-9 template, installs fine in AppVM #3714

Closed
dtto opened this Issue Mar 19, 2018 · 17 comments

Comments

Projects
None yet
6 participants
@dtto

dtto commented Mar 19, 2018

Qubes OS version:

R4.0

Affected component(s):

Samba


Steps to reproduce the behavior:

On a new Q4.0 install, attempt to install samba on the debian-9 template-vm.

Note that installing will work on an AppVM using the Debian-9 template.

Expected behavior:

Samba installs

Actual behavior:

`Setting up samba (2:4.5.12+dfsg-2+deb9u2) ...
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Job for nmbd.service failed because a timeout was exceeded.
See "systemctl status nmbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nmbd, action "start" failed.
● nmbd.service - Samba NMB Daemon
Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Sun 2018-03-18 11:58:08 PDT; 9ms ago
Docs: man:nmbd(8)
man:samba(7)
man:smb.conf(5)
Process: 8503 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=killed, signal=TERM)
Main PID: 8503 (code=killed, signal=TERM)
Status: "nmbd: No local IPv4 non-loopback interfaces available, waiting for interface ..."

Mar 18 11:56:38 debian-9 systemd[1]: Starting Samba NMB Daemon...
Mar 18 11:58:08 debian-9 systemd[1]: nmbd.service: Start operation timed ou…ing.
Mar 18 11:58:08 debian-9 systemd[1]: Failed to start Samba NMB Daemon.
Mar 18 11:58:08 debian-9 systemd[1]: nmbd.service: Unit entered failed state.
Mar 18 11:58:08 debian-9 systemd[1]: nmbd.service: Failed with result 'timeout'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
`

General notes:

I tried manually unmasking Samba. This results in the installer masking it and then the same error.

I believe this has to do with the lack of networking on the template vms.

Also, I did not have this issue on R3.2.


Related issues:

@awokd

This comment has been minimized.

Show comment
Hide comment
@awokd

awokd Mar 19, 2018

Temporarily add a NetVM to your template (with firewall set to deny all if you prefer) then try to install Samba again?

awokd commented Mar 19, 2018

Temporarily add a NetVM to your template (with firewall set to deny all if you prefer) then try to install Samba again?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 19, 2018

Member

Maybe adding a dummy interface will be enough:

ip link add d0 type dummy
ip addr add 192.168.0.1/24 dev d0
ip link set d0 up

Slightly more typing than just adding netvm, but this way you keep your template network disconnected.

Member

marmarek commented Mar 19, 2018

Maybe adding a dummy interface will be enough:

ip link add d0 type dummy
ip addr add 192.168.0.1/24 dev d0
ip link set d0 up

Slightly more typing than just adding netvm, but this way you keep your template network disconnected.

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Mar 19, 2018

Member

This isn't an issue, in that samba installs perfectly well and qubes based on the template will automatically start smbd as expected. (Unless you've followed the advice on installing services in Debian based Templates.)

The error relating to samba-ad-dc.service is expected, (and actually appeared in 3.2 as well). The log tells you to ignore this error.
The error re nmbd is also expected because the template doesn't have network interfaces. but it doesn't need them, because the template wont be running samba.

Samba installs correctly and is usable in template based qubes. What more is needed?

Member

unman commented Mar 19, 2018

This isn't an issue, in that samba installs perfectly well and qubes based on the template will automatically start smbd as expected. (Unless you've followed the advice on installing services in Debian based Templates.)

The error relating to samba-ad-dc.service is expected, (and actually appeared in 3.2 as well). The log tells you to ignore this error.
The error re nmbd is also expected because the template doesn't have network interfaces. but it doesn't need them, because the template wont be running samba.

Samba installs correctly and is usable in template based qubes. What more is needed?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 19, 2018

Member

Samba installs correctly and is usable in template based qubes. What more is needed?

Not really: dpkg: error processing package samba (--configure)
If that script would ignore service start error, then everything would be ok.

Member

marmarek commented Mar 19, 2018

Samba installs correctly and is usable in template based qubes. What more is needed?

Not really: dpkg: error processing package samba (--configure)
If that script would ignore service start error, then everything would be ok.

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Mar 19, 2018

Member

Let me rephrase - Samba installs correctly given that there is no network interface and works properly in template based qubes.
It really is a non issue. The post-install script error doesn't matter.

Member

unman commented Mar 19, 2018

Let me rephrase - Samba installs correctly given that there is no network interface and works properly in template based qubes.
It really is a non issue. The post-install script error doesn't matter.

@h01ger

This comment has been minimized.

Show comment
Hide comment
@h01ger

h01ger Mar 19, 2018

h01ger commented Mar 19, 2018

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Mar 19, 2018

Member

But that's true for every package that tries to bind to a local interface: it isn't samba specific.
My point is that samba installs and is usable in a qube, where it matters.

If there's a perceived need to address the more general point then Debian templates will have to have some network interface provided. Or users accept the dpkg error as a consequence of the Qubes infrastructure.

Member

unman commented Mar 19, 2018

But that's true for every package that tries to bind to a local interface: it isn't samba specific.
My point is that samba installs and is usable in a qube, where it matters.

If there's a perceived need to address the more general point then Debian templates will have to have some network interface provided. Or users accept the dpkg error as a consequence of the Qubes infrastructure.

@h01ger

This comment has been minimized.

Show comment
Hide comment
@h01ger

h01ger Mar 19, 2018

h01ger commented Mar 19, 2018

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Mar 19, 2018

Member

It's not a Qubes bug, and I don't believe it's samba specific, although I dont recall seeing this on apache install.
If you follow the advice in the docs then the pain is minimised on future apt use.

I'd pass it upstream and put something in the docs, as we did for service installation generally.

Member

unman commented Mar 19, 2018

It's not a Qubes bug, and I don't believe it's samba specific, although I dont recall seeing this on apache install.
If you follow the advice in the docs then the pain is minimised on future apt use.

I'd pass it upstream and put something in the docs, as we did for service installation generally.

@h01ger

This comment has been minimized.

Show comment
Hide comment
@h01ger

h01ger Mar 19, 2018

h01ger commented Mar 19, 2018

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 19, 2018

Member

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:... brd ff:ff:ff:ff:ff:ff inet 10.137.../32 brd 10.255.255.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::.../64 scope link valid_lft forever preferred_lft forever

You do have IPv4-enabled interface here. On Qubes 4.0, templates have netvm=none by default.

Member

marmarek commented Mar 19, 2018

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:... brd ff:ff:ff:ff:ff:ff inet 10.137.../32 brd 10.255.255.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::.../64 scope link valid_lft forever preferred_lft forever

You do have IPv4-enabled interface here. On Qubes 4.0, templates have netvm=none by default.

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Mar 19, 2018

Member

Yes, it's in Qubes 4.0 as OP said, and perhaps it is samba specific.
I've just installed a host of services (telnet,ftp,ssh, postfix, pop3, apache, etc), and it's only samba that throws an error.
I continue to think it' s an upstream bug, and we should close this with a note in the docs.

Member

unman commented Mar 19, 2018

Yes, it's in Qubes 4.0 as OP said, and perhaps it is samba specific.
I've just installed a host of services (telnet,ftp,ssh, postfix, pop3, apache, etc), and it's only samba that throws an error.
I continue to think it' s an upstream bug, and we should close this with a note in the docs.

@h01ger

This comment has been minimized.

Show comment
Hide comment
@h01ger

h01ger Mar 19, 2018

h01ger commented Mar 19, 2018

@andrewdavidwong andrewdavidwong added C: doc task and removed bug labels Mar 20, 2018

@andrewdavidwong andrewdavidwong modified the milestones: Release 4.0, Documentation/website Mar 20, 2018

@dtto

This comment has been minimized.

Show comment
Hide comment
@dtto

dtto Mar 20, 2018

Yes, that's an easy fix which works. Thanks!

dtto commented Mar 20, 2018

Yes, that's an easy fix which works. Thanks!

@dtto

This comment has been minimized.

Show comment
Hide comment
@dtto

dtto Mar 20, 2018

Sorry, I responded to the first response here but didn't refresh so I missed all the comments.

I don't know why it doesn't reproduce for you, @h01ger. All I can say is that it was a clean install and the error message popped up. The fix suggested by @marmarek worked (temporarily enabling the network interface). I guess maybe it was just a weird one-off thing on my machine though I don't know what would cause it.

It was annoying though because every time I ran apt it would try to configure samba and fail, with a significant delay while it was trying to configure. But if no one else is having this issue, then no need to work on it further.

dtto commented Mar 20, 2018

Sorry, I responded to the first response here but didn't refresh so I missed all the comments.

I don't know why it doesn't reproduce for you, @h01ger. All I can say is that it was a clean install and the error message popped up. The fix suggested by @marmarek worked (temporarily enabling the network interface). I guess maybe it was just a weird one-off thing on my machine though I don't know what would cause it.

It was annoying though because every time I ran apt it would try to configure samba and fail, with a significant delay while it was trying to configure. But if no one else is having this issue, then no need to work on it further.

@unman

This comment has been minimized.

Show comment
Hide comment
@unman

unman Mar 22, 2018

Member

I've raised a bug against the Debian package - couldn't see that @h01ger had done so.
Also referenced this issue on the Debian templates page, with note to workaround.
Can we close?

Member

unman commented Mar 22, 2018

I've raised a bug against the Debian package - couldn't see that @h01ger had done so.
Also referenced this issue on the Debian templates page, with note to workaround.
Can we close?

@dtto

This comment has been minimized.

Show comment
Hide comment
@dtto

dtto Mar 22, 2018

Fine by me.

dtto commented Mar 22, 2018

Fine by me.

@dtto dtto closed this Mar 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment