The project doesn't contain an example systemd .service file for starting the queue runner (only one for init.d). This might be important since debian is switching to systemd and archlinux has switched a while ago.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

helmo’s picture

Status: Active » Needs review
FileSize
377 bytes

first draft

helmo’s picture

helmo’s picture

Updated with the new drush location... and committed.

We might want to do an extra debian package update for this.

gboudrias’s picture

Not sure how to test patches to debian packages but manually creating the file in your patch seemed to solve the install issue.

gboudrias’s picture

Status: Needs review » Needs work

This doesn't seem to simply install yet. I've grep'd the repo for systemd and came up empty.

I've looked at the doc and I'm pretty sure we're missing things:

Most importantly, it seems we need to replace "dh $@" with "dh $@ --with=systemd".

I assume this would mess up the init.d setup so we probably need to detect whether systemd is installed. (I would personally just drop init.d support entirely, but I suspect there are use cases I'm not aware of here.)

I have no idea how to test this :)

helmo’s picture

Not sure what made it work in my previous tests...

Moving to the provision queue as the patch belongs there.

helmo’s picture

Project: Hostmaster (Aegir) » Provision
Category: Feature request » Bug report

  • helmo committed f5031a7 on 7.x-3.x
    Issue #2347557 by helmo: Hint debian packaging on the systemd service...
helmo’s picture

:( build failed http://ci.aegirproject.org/view/Debian%20dev%20builds/job/D_aegir-debian...

The CI server is wheezy ... lacking build support for this.

helmo’s picture

I think I tested with a build from my ubuntu dev box before ... guessing that the systemd file was picked up there by default.

helmo’s picture

As a work around .. create the file manually as /lib/systemd/system/hosting-queued.service

gboudrias’s picture

Issue tags: +Aegir 3.0.2
gboudrias’s picture

Issue tags: -Aegir 3.0.2 +Aegir 3.1
anarcat’s picture

note that even though Debian jessie switched to systemd, it still supports old-style init.d files, so this shouldn't be blocking anything, IMHO.

gboudrias’s picture

Unless something's changed, we still have the bug, even though we don't need the file, so maybe we should just remove all references to systemd? I'll try to work in that direction.

gboudrias’s picture

I... I think it worked! Please test against current HEAD :)

(All I did was remove both systemd mentions and the service file, however I don't feel confident enough in my Debian packaging to commit without someone else testing it.)

  • helmo committed 642defb on 7.x-3.x authored by gboudrias
    Issue #2347557 by helmo, gboudrias: Revert systemd service file to fix...
gboudrias’s picture

Status: Needs work » Needs review
helmo’s picture

Status: Needs review » Needs work

I'm setting this back to needs work as the current patch clearly breaks the debian build process.

gboudrias’s picture

Issue tags: -Aegir 3.1

Let's try to work on this for 3.2.

helmo’s picture

For the record...:

On a fresh Debian Jessie:

Enabling hosting-queued daemon
The following extensions will be enabled: hosting_queued
Do you really want to continue? (y/n): y
hosting_queued was enabled successfully.                                                                                                                                                                 [ok]
Enabling Hosting queue daemon feature.                                                                                                                                                                   [status]
Failed to start hosting-queued.service: Unit hosting-queued.service failed to load: No such file or directory.
dpkg: error processing package aegir3-hostmaster (--configure):
 subprocess installed post-installation script returned error exit status 6
dpkg: dependency problems prevent configuration of aegir3:
 aegir3 depends on aegir3-hostmaster (>= 3.0.1+102.e197950); however:
  Package aegir3-hostmaster is not configured yet.

dpkg: error processing package aegir3 (--configure):
 dependency problems - leaving unconfigured
glenndebacker’s picture

I'm getting the same error as helmo when doing a fresh install. My devops/linux/Aegir kungfu isn't that great so I dare to ask: is there a solution to work around this problem ?

Or is its better to downgrade to Debian Wheezy for the time being ?

tuxick’s picture

any news on this, or a workaround so i can continue install?

gboudrias’s picture

On Jessie you can just run apt-get install once it's failed once. If that doesn't fix it you may need to create the service file manually.

helmo’s picture

  • helmo committed 59a8bce on 7.x-3.x
    Issue #2347557 by helmo: Debian packaging of the systemd service file...

  • helmo committed a299327 on 7.x-3.x
    Issue #2347557 by helmo, gboudrias: Add dh-systemd as a Debian build...
helmo’s picture

I've committed this again as it shoud go better now that we have #2553221: Build Debian packages in docker container ... but it's not all green yet :(

helmo’s picture

Current status: after install the service is available, but not started at boottime.

# service hosting-queued status
 hosting-queued.service - Hosting queue daemon
   Loaded: loaded (/lib/systemd/system/hosting-queued.service; disabled)


# systemctl enable hosting-queued
Synchronizing state for hosting-queued.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d hosting-queued defaults
Executing /usr/sbin/update-rc.d hosting-queued enable


# service hosting-queued status
 hosting-queued.service - Hosting queue daemon
   Loaded: loaded (/lib/systemd/system/hosting-queued.service; enabled)

Notice the status change from 'disabled' to 'enabled'.

To fix this in the Debian package I think we need to add this to the debian/rules file.

dh_systemd_enable --name=hosting-queued

But would that break packages on wheezy again?

  • helmo committed 97af1bb on 7.x-3.x
    Issue #2347557 by helmo, gboudrias: Enable the systemd hosting-queued
    
helmo’s picture

Status: Needs work » Fixed
            if [ -f /bin/systemctl ]; then
              # There must be a better way, but we're trying to stay compatible with Debian Wheezy and Jessie.
              # See https://www.drupal.org/node/2347557 for discussion.
              /bin/systemctl enable hosting-queued
            fi

This should handle enabling the service ... tested in local vagrant.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.