Py36-iocage service won't start


#1

Iocage installed from Trident packages using App Cafe on a new install. I note that it is version 1.0, while GitHub has 1.1. Anyway, I tried to start the service using the SysAdm app and from CLI: As root:

service iocage start

  • Starting iocage …
    Usage: iocage [OPTIONS] COMMAND [ARGS]…

Error: No such command “rcboot”. [ !! ]

  • ERROR: iocage failed to start

I looked at /usr/local/etc/init.d/iocage and found:

name=“iocage”
description=“Control iocage-managed jails”
depend()
{

need localmount
after network
keyword -shutdown -stop -jail
}

start()
{
ebegin "Starting name" /usr/local/bin/iocage rcboot eend ?
}

stop()
{
ebegin "Stopping name" /usr/local/bin/iocage rcshutdown eend ?
}

It seems that the error comes from the rcboot statement. Is this code outdated and updated somewhere? Has anyone else had trouble getting service iocage to start? And, yes, I have iocage_enable=“YES” in my rc.conf

What’s weird is that despite this ‘failure’, iocage partially works anyway…
If anyone out there has had this problem and corrected it, please share!

2otherjobs (Tom)


#2

I don’t use iocage, but the argument “rcboot” is getting passed to the command /usr/local/bin/iocage and the error indicates it’s not a valid argument.

see what you get if you type in:
/usr/local/bin/iocage --help

That should display some sort of help, maybe even a list of valid commands.
then “man iocage” to see what that has for more information.

That’s about all I can help with I’m afraid.


#3

I found that rcboot (as well as rcshutdown later in the file) are no longer in the list of iocage commands. I will try to replace those commands with others (start and shutdown are the only related options on the list) and see what happens.

Anyway, thanks for the suggestion.


#4

be aware in the next upgrade py36-iocag will not be available, it failed to build

=========================================================================== =======================<phase: fetch-depends >============================ =========================================================================== =======================<phase: fetch >============================ ===> License BSD2CLAUSE accepted by the user => iocage-iocage-1.1-19d8eb7f4272dac7e206b4f827732f46177439c8_GH0.tar.gz is not in /usr/ports/sysutils/iocage/distinfo. => Either /usr/ports/sysutils/iocage/distinfo is out of date, or => iocage-iocage-1.1-19d8eb7f4272dac7e206b4f827732f46177439c8_GH0.tar.gz is spelled incorrectly. *** Error code 1


#5

Thanks. I have 1.0 working after making a minor change to init.d/Iocage. So I will sit this upgrade out.


#6

thought I’d give you a heads up


#7

Just hit me to ask - is there something I have to do freeze py36-iocage at version 1.0 to avoid it AUTOMATICALLY


#8

being updated to version 1.1? Or can I set a flag that will permit the other packages to update but not that one next time Trident rolls out an update?


#9

in a terminal, if you really want to lock that package, open a terminal and type

sudo pkg lock p36-iocage (if that is the actual name)

from the man page

pkg lock Prevent modification or deletion of a package.


#10

SOLVED
FWIW, replacing a minor amount of code in /usr/local/etc/init.d/iocage fixed the problem:

rcboot eend?
replaced by
start —rc

and the code
rcshutdown eend?
with
stop —rc

then save the changes. Run

service iocage start
and py36-iocage starts successfully.

This change survives reboot. It does NOT survive Trident software updates - the latest update to more current version of py36-iocage-1.0 reversed my changes. Same fix applied again worked.

Is there a way to pass this on the the pkg devs?


#11

The “most correct” way is git clone the pkg tree, make the change then submit a pull request.
Another way would be create a patch with diff -u, submit a bug on github for the issue and include the patch.
I don’t know which way would be preferred.