ix-plugin-hub / iocage-plugin-index

Community created JSON files for plugins.
154 stars 112 forks source link

iocage doesn't recognize jail update for transmission #223

Open duenni opened 3 years ago

duenni commented 3 years ago

Hi,

I updated to TrueNAS 12.0 U3 from FreeNAS and after that I also upgraded my iocage jail for transmission with iocage upgrade transmission -r 12.2-RELEASE. This seems to have worked, unamefrom inside the jail shows:

root@transmission:~ # uname -a
FreeBSD transmission 12.2-RELEASE-p6 FreeBSD 12.2-RELEASE-p6 f2858df162b(HEAD) TRUENAS  amd64

However iocage itself and also the TrueNAS UI won't recognize the update.

sudo iocage list                   
+-----+--------------+-------+--------------+------+
| JID |     NAME     | STATE |   RELEASE    | IP4  |
+=====+==============+=======+==============+======+
| 9   | transmission | up    | 12.1-RELEASE | DHCP |
+-----+--------------+-------+--------------+------+

also the json files for the jail show release 12.1 instead of 12.2.

cat /mnt/tank/iocage/jails/transmission/config.json     
{
    "basejail": 1,
    "boot": 1,
    "bpf": 1,
    "dhcp": 1,
    "host_hostname": "transmission",
    "host_hostuuid": "transmission",
    "jail_zfs_dataset": "iocage/jails/transmission/data",
    "last_started": "2021-05-02 09:35:12",
    "nat_forwards": "tcp(9091:9091)",
    "plugin_name": "transmission",
    "plugin_repository": "https://github.com/ix-plugin-hub/iocage-plugin-index.git",
    "release": "12.1-RELEASE-p13",
    "type": "pluginv2",
    "vnet": 1,
    "vnet0_mac": "xxxxx xxxx"
}                                          
cat /mnt/tank/iocage/jails/transmission/transmission.json
{
    "name": "Transmission",
    "plugin_schema": "2",
    "release": "12.1-RELEASE",
    "artifact": "https://github.com/freenas/iocage-plugin-transmission.git",
    "official": false,
    "properties": {
        "nat": 1,
        "nat_forwards": "tcp(9091:9091)"
    },
    "pkgs": [
        "transmission-daemon",
        "transmission-web"
    ],
    "packagesite": "http://pkg.FreeBSD.org/${ABI}/latest",
    "fingerprints": {
        "iocage-plugins": [
            {
                "function": "sha256",
                "fingerprint": "xxxxxx"
            }
        ]
    },
    "revision": "0"
}

Shouln't iocage update these files? What can I do to solve this?

jasker5183 commented 3 years ago

On 12.0-U4 this problem exists with Transmission and Jackett.

fulder commented 3 years ago

@jasker5183, @duenni when it comes to the plugin manifest and not being updated it's because the 12.2-RELEASE index branch had a lot of plugins still running 12.1-RELEASES. The majority of them should now (today) be updated after the recent portback from master to the 12.2-RELEASE branch (https://github.com/ix-plugin-hub/iocage-plugin-index/pull/235). Could you try refreshing your plugin index and try to upgrade the plugins again (iocage upgrade transmission, iocage upgrade jackett should be enough) to verify if it helps the buggy list behavior and upgrades the plugins correctly? I just did a quick upgrade of both these plugins on my system and it seems like it worked just fine.

When it comes to iocage list and the jail config still showing the old version could be a bug in the iocage command itself rather than the plugins.

jasker5183 commented 3 years ago

Yes, that fixed it both jails are now showing up as 12.2-RELEASE. Thanks.

duenni commented 3 years ago

Hi!

Thanks for this, it seems to be fixed. 👍 I got an update notification in the GUI and tried to upgrade there but that didn't work so I ran iocage upgrade transmission as you suggested. This threw a bunch of errors:

sudo iocage upgrade transmission

Password:
Snapshotting transmission... 
Updating plugin INDEX... 
Running upgrade... 
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 14 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
    bittorrent-libutp: 0.20130514_1
    ca_root_nss: 3.63
    curl: 7.77.0
    dht: 0.26
    gettext-runtime: 0.21
    indexinfo: 0.3.1
    libb64: 1.2.1
    libevent: 2.1.12
    libnatpmp: 20150609
    libnghttp2: 1.43.0
    miniupnpc: 2.2.0
    pkg: 1.16.3
    transmission-daemon: 3.00_4
    transmission-web: 3.00_1

Number of packages to be removed: 14

The operation will free 40 MiB.
[transmission] [1/14] Deinstalling transmission-daemon-3.00_4...
[transmission] [1/14] Deleting files for transmission-daemon-3.00_4: .......... done
==> You should manually remove the "transmission" user.
==> You should manually remove the "transmission" group
[transmission] [2/14] Deinstalling curl-7.77.0...
[transmission] [2/14] Deleting files for curl-7.77.0: .......... done
[transmission] [3/14] Deinstalling gettext-runtime-0.21...
[transmission] [3/14] Deleting files for gettext-runtime-0.21: .......... done
[transmission] [4/14] Deinstalling bittorrent-libutp-0.20130514_1...
[transmission] [4/14] Deleting files for bittorrent-libutp-0.20130514_1: .......... done
[transmission] [5/14] Deinstalling ca_root_nss-3.63...
[transmission] [5/14] Deinstalling ca_root_nss-3.63...
pkg: Failed to execute lua script: [string "-- args: etc/ssl/cert.pem.sample..."]:12: attempt to call a nil value (field 'filecmp')
pkg: lua script failed
pkg: lua script failed
[transmission] [5/14] Deleting files for ca_root_nss-3.63: ....... done
pkg: lua script failed
pkg: lua script failed
[transmission] [6/14] Deinstalling dht-0.26...
[transmission] [6/14] Deleting files for dht-0.26: ........ done
pkg: lua script failed
pkg: lua script failed
[transmission] [7/14] Deinstalling indexinfo-0.3.1...
[transmission] [7/14] Deleting files for indexinfo-0.3.1: .... done
pkg: lua script failed
pkg: lua script failed
[transmission] [8/14] Deinstalling libb64-1.2.1...
[transmission] [8/14] Deleting files for libb64-1.2.1: ....... done
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
[transmission] [9/14] Deinstalling libevent-2.1.12...
[transmission] [9/14] Deleting files for libevent-2.1.12: .......... done
pkg: lua script failed
pkg: lua script failed
[transmission] [10/14] Deinstalling libnatpmp-20150609...
[transmission] [10/14] Deleting files for libnatpmp-20150609: ........ done
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
[transmission] [11/14] Deinstalling libnghttp2-1.43.0...
[transmission] [11/14] Deleting files for libnghttp2-1.43.0: .......... done
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
[transmission] [12/14] Deinstalling miniupnpc-2.2.0...
[transmission] [12/14] Deleting files for miniupnpc-2.2.0: .......... done
pkg: lua script failed
[transmission] [13/14] Deinstalling pkg-1.16.3...
pkg: lua script failed
[transmission] [13/14] Deinstalling pkg-1.16.3...
pkg: Failed to execute lua script: [string "-- args: etc/pkg.conf.sample..."]:12: attempt to call a nil value (field 'filecmp')
[transmission] [13/14] Deinstalling pkg-1.16.3...
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
[transmission] [13/14] Deleting files for pkg-1.16.3: .......... done
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
[transmission] [14/14] Deinstalling transmission-web-3.00_1...
[transmission] [14/14] Deleting files for transmission-web-3.00_1: .......... done
pkg: lua script failed
Snapshotting transmission... 
Updating plugin INDEX... 
Updating plugin artifact... 
Cloning git repository

Branch 12.2-RELEASE does not exist at https://github.com/freenas/iocage-plugin-transmission.git!
Using "master" branch for plugin, this may not work with your RELEASE
Installing new pkgs... 
Repo: iocage-plugins already exists, skipping!

Testing Host DNS response to pkg.FreeBSD.org
Testing transmission's SRV response to pkg.FreeBSD.org
Testing transmission's DNSSEC response to pkg.FreeBSD.org

Installing plugin packages:
  - transmission-daemon... 
  - transmission-web... 
Cloning git repository

Branch 12.2-RELEASE does not exist at https://github.com/freenas/iocage-plugin-transmission.git!
Using "master" branch for plugin, this may not work with your RELEASE

transmission successfully upgraded!

Result looks good.

iocage list:

+-----+--------------+-------+--------------+------+
| JID |     NAME     | STATE |   RELEASE    | IP4  |
+=====+==============+=======+==============+======+
| 3   | transmission | up    | 12.2-RELEASE | DHCP |
+-----+--------------+-------+--------------+------+
cat /mnt/tank/iocage/jails/transmission/config.json     
{
    "basejail": 1,
    "boot": 1,
    "bpf": 1,
    "dhcp": 1,
    "host_hostname": "transmission",
    "host_hostuuid": "transmission",
    "jail_zfs_dataset": "iocage/jails/transmission/data",
    "last_started": "2021-06-21 11:20:06",
    "nat_forwards": "tcp(9091:9091)",
    "plugin_name": "transmission",
    "plugin_repository": "https://github.com/ix-plugin-hub/iocage-plugin-index.git",
    "release": "12.2-RELEASE-p6",
    "type": "pluginv2",
    "vnet": 1,
    "vnet0_mac": "xxx"
}
cat /mnt/tank/iocage/jails/transmission/transmission.json 
{
    "name": "Transmission",
    "release": "12.2-RELEASE",
    "artifact": "https://github.com/freenas/iocage-plugin-transmission.git",
    "official": false,
    "properties": {
        "nat": 1,
        "nat_forwards": "tcp(9091:9091)"
    },
    "pkgs": [
        "transmission-daemon",
        "transmission-web"
    ],
    "packagesite": "http://pkg.FreeBSD.org/${ABI}/latest",
    "fingerprints": {
        "iocage-plugins": [
            {
                "function": "sha256",
                "fingerprint": "xxx"
            }
        ]
    },
    "revision": 0
}

The GUI also shows 12.2-RELEASE-p6 for the plugin. Thanks!