Actions
Bug #7954
openPackage upgrade/reinstall gets stuck on deinstall if the package-provided service is not running
Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
Squid
Target version:
-
Start date:
10/16/2017
Due date:
% Done:
0%
Estimated time:
Plus Target Version:
Affected Version:
2.4.x
Affected Plus Version:
Affected Architecture:
All
Description
So you have a package and the service is not running. Trying to upgrade/reinstall produces the following:
Installed packages to be UPGRADED: pfSense-pkg-squid: 0.4.41 -> 0.4.42 [pfSense] Number of packages to be upgraded: 1 57 KiB to be downloaded. [1/1] Fetching pfSense-pkg-squid-0.4.42.txz: ........ done Checking integrity... done (0 conflicting) [1/1] Upgrading pfSense-pkg-squid from 0.4.41 to 0.4.42... Extracting pfSense-pkg-squid-0.4.42: .......... done Removing squid components... Menu items... done. Services... Saving updated package information... overwrite! Loading package configuration... done. Configuring package components... Loading package instructions... Custom commands... Executing custom_php_install_command()...done. Executing custom_php_resync_config_command()...done. Menu items... done. Services...
There, it gets stuck till you kill the /usr/local/bin/php -f /etc/rc.packages pfSense-pkg-squid DEINSTALL
process. This is logged by syslog:
Oct 16 22:02:56 php /etc/rc.packages: The command '/usr/local/etc/rc.d/clamd.sh stop' returned exit code '1', the output was '' Oct 16 22:02:51 php /etc/rc.packages: The command '/usr/local/etc/rc.d/squid.sh stop' returned exit code '1', the output was 'squid: ERROR: Could not send signal 15 to process 78563: (3) No such process squid: ERROR: Could not send signal 9 to process 78563: (3) No such process'
Once you've killed the process, the reinstall/upgrade finishes.
Services... done. Writing configuration... done. Message from pfSense-pkg-squid-0.4.42: Please visit Services - Squid Proxy Server menu to configure the package and enable the proxy. >>> Cleaning up cache... done.
Trying with reinstall instead:
The following 1 package(s) will be affected (of 0 checked): Installed packages to be REINSTALLED: pfSense-pkg-squid-0.4.42 [pfSense] Number of packages to be reinstalled: 1 [1/1] Reinstalling pfSense-pkg-squid-0.4.42... [1/1] Extracting pfSense-pkg-squid-0.4.42: .......... done Removing squid components... Menu items... done. Services...
Zzzzzzzzzzz... Killing the deinstall process makes it move:
Services... Saving updated package information... overwrite! Loading package configuration... done. Configuring package components... Loading package instructions... Custom commands... Executing custom_php_install_command()...done. Executing custom_php_resync_config_command()...done. Menu items... done. Services... done. Writing configuration... done. Message from pfSense-pkg-squid-0.4.42: Please visit Services - Squid Proxy Server menu to configure the package and enable the proxy. >>> Cleaning up cache... done.
In general, the pkg things gets badly confused here, spawning multiple processes for some reason:
$ ps auxww | grep squid root 72763 0.0 0.1 13084 2604 - I 22:02 0:00.00 /bin/sh /usr/local/sbin/pfSense-upgrade -y -l /cf/conf/pkg_log_pfSense-pkg-squid.txt -p /tmp/pfSense-upgrade.sock -i pfSense-pkg-squid -f root 73512 0.0 0.0 6172 1940 - I 22:02 0:00.00 /usr/bin/lockf -s -t 5 /tmp/pfSense-upgrade.lock /usr/local/libexec/pfSense-upgrade -y -l /cf/conf/pkg_log_pfSense-pkg-squid.txt -p /tmp/pfSense-upgrade.sock -i pfSense-pkg-squid -f root 73670 0.0 0.1 13084 2756 - I 22:02 0:00.01 /bin/sh /usr/local/libexec/pfSense-upgrade -y -l /cf/conf/pkg_log_pfSense-pkg-squid.txt -p /tmp/pfSense-upgrade.sock -i pfSense-pkg-squid -f root 82869 0.0 0.1 13084 2756 - I 22:02 0:00.00 /bin/sh /usr/local/libexec/pfSense-upgrade -y -l /cf/conf/pkg_log_pfSense-pkg-squid.txt -p /tmp/pfSense-upgrade.sock -i pfSense-pkg-squid -f root 82886 0.0 0.1 13084 2756 - I 22:02 0:00.00 /bin/sh /usr/local/libexec/pfSense-upgrade -y -l /cf/conf/pkg_log_pfSense-pkg-squid.txt -p /tmp/pfSense-upgrade.sock -i pfSense-pkg-squid -f root 83293 0.0 0.0 8224 1980 - I 22:02 0:00.00 tee -a /cf/conf/pkg_log_pfSense-pkg-squid.txt root 83926 0.0 0.1 10264 3912 - I 22:02 0:00.00 pkg-static -o EVENT_PIPE=/tmp/pfSense-upgrade.sock upgrade -f pfSense-pkg-squid root 84039 0.0 0.3 26868 13444 - I 22:02 0:02.15 pkg-static -o EVENT_PIPE=/tmp/pfSense-upgrade.sock upgrade -f pfSense-pkg-squid root 85417 0.0 0.8 254228 34852 - I 22:02 0:00.24 /usr/local/bin/php -f /etc/rc.packages pfSense-pkg-squid DEINSTALL
Huh???
Actions