Package deletion then have to restart web configurator
-
I made a couple of pull requests, which Seth has committed, to make the reference count in the shared memory section even more robust - locking it while it is incremented and decremented. Hopefully now as long as all code does actually call conf_mount_rw folowed by conf_mount_ro after it has finished changing stuff, the filesystem will always end up read-only again on nanobsd.
Also tidied up an unnecessary rw then ro mount in pkg-utils which was slowing things down every time the user navigated to System:Packages and it listed Installed Packages.
This is all good stuff for nanobsd in general, but it doesn't fix the sig11. To fix that I still need to comment out the file restore from pkg-utils.inc:// exec("/usr/bin/tar xzPfU /tmp/pkg_libs.tgz -C /"); // exec("/usr/bin/tar xzPfU /tmp/pkg_bins.tgz -C /"); // @unlink("/tmp/pkg_libs.tgz"); // @unlink("/tmp/pkg_bins.tgz");
Now it needs someone like JimP who has the big picture, to work out how best to trim down this restore - maybe can do a comparison, work out if anything essential has gone missing, and only put the missing things back?
-
I'm going over that with the other devs.
The problem is likely the U flag to tar, which unlinks files before restoring. I wager if that were removing, and even better if "k" was put in its place, it may behave better.
"k" would cause it to keep existing files, and since this is restoring a backup after files were removed, that seems to make more sense to me. I'm just not sure if there are any edge cases I'm forgetting that required U to restore properly.
If the pkg uninstall corrupted the file, U would be better… but I'm not sure if that was one of the reasons.
-
A quick test of this on NanoBSD is promising. Without U, but with k (just replaced U with k in the tar command), the GUI is fine and everything seems happy.
The blinkled process still crashed but since it was uninstalled I expected as much.
Not sure how that might help/hurt a full install. I've got a discussion started with the other devs to see if I'm missing anything there. More testing would be appreciated before I commit it.
-
Good news - I did various install/uninstalls with the new code and there are no problems. webConfigurator keeps running fine, no sig11 (apart from blinkled, which is a different issue).
Installed the following:
blinkled
openvpn client export utility
pfblocker
squid3then did a firmware upgrade to the build that just finished:
2.1-BETA0 (i386)
built on Tue Jul 31 19:07:11 EDT 2012
FreeBSD 8.3-RELEASE-p3All went well. It reinstalled all the packages and the webConfigurator stayed up. After the package installs were finished all services were running, openvpn link up, web browsing from client… working.
During the package installs it does a package removal first for each package. That now spews out a lot of "file exists" messages from the tar restore with k option, but it works.
I guess the package removal is just in case, but if the code could detect that it is a package install from the first boot after a firmware upgrade then it could know that the package removal step is not needed.I have attached a log of the serial console output for the record.
-
Looks like we might just need "2>/dev/null" at the end of the tar command to silence the errors.
If you want to test that, edit the command(s) in pkg-utils.inc and add it, and then:
touch /conf/needs_package_sync
Then reboot, that'll make it do the pkg reinstall when it boots back up.
-
Ermal has already committed a change to use mwexec() instead of plain exec() - that should stop the loads of console output. He also fixed up the %age display on the console so it doesn't keep spewing out all across the line. I'll give those a try.
-
ok, I've been a bit busy this morning so I didn't review the commit log yet.
-
I did a gitsync on my ALIX and ran the test I mentioned and it worked fine with the latest changes Ermal made, so this may be all solved now. (knock on wood)
-
Upgraded to:
2.1-BETA0 (i386)
built on Wed Aug 1 16:50:12 EDT 2012
FreeBSD 8.3-RELEASE-p3Copy of console output is attached - cleaner than before. If I am feeling OCD I will find the appropriate places to put "\n" so that the %age output doesn't scribble over the beginning of a line of text.
Everything reinstalled fine - blinkled, openvpn, pfblocker, squid3
Note: squid3 left the mount ref count at 2 after its install. Thus the mount points do not go back to read-only. It has missing and mis-placed conf_mount_ro() calls. I have submitted a separate pull request to fix that. Not an issue for this thread.
-
Yep, I did feel OCD! I have put in a couple of pull requests to tidy up the console output some more. Everything functional seems fine. I'll see how the console output looks tomorrow after the next snapshot/upgrade/package install sequence.
After the conf_mount_ro fixups for squid and squid3 it should also leave the filesystem mounted read-only when finished.