Opened 6 months ago

Closed 8 weeks ago

#940 closed System Defect (fixed)

Warden Export Jail Fails PCBSD10.0

Reported by: akelling Owned by: kris
Priority: major Milestone:
Component: System Configuration Version: 10.0-RELEASE
Keywords: Cc: trac-bugs@…

Description

PCBSD10.0-RELEASE-p3-01-13-2014-x64-DVD via VirtualBox?.

Exporting warden jails does not work though the gui.
Allows you to select the directory and then it goes to do the work and fails. Progress bar comes for one second but does not do any of the work.
Warden export from cli does work.

I looked and could not find a warden log file to see if there was errors written there. Maybe not looking in the right place(/var/log) Also did not get console output.

Attachments (3)

konsole-plone-export.txt (17.9 KB) - added by helix 4 months ago.
process list
jail-export.png (75.6 KB) - added by helix 2 months ago.
pcbsd-version.png (43.6 KB) - added by helix 2 months ago.
Versions installed

Download all attachments as: .zip

Change History (21)

comment:1 Changed 6 months ago by kris

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 5 months ago by helix

I also have problems with exporting Jail from GUI (10-RELEASE with CLI ver. r1391939371 and UI utilities ver. r1391939371).
I have started warden from console as su and tried "Update" which works:

# warden gui
Locale: "sl" 
ID                      AUTOSTART   STATUS      TYPE        
---------------------------------------------------------------------------
Plone                   Disabled    Stopped     standard    
django                  Disabled    Stopped     standard    
ldap                    Disabled    Stopped     standard    
Starting Update Check... 
Starting Update Check... 
Update output... "Checking for jail updates to Plone..." 
Update output... "################################################" 
Update output... "Updating repository catalogue" 
Update output... "Upgrades have been requested for the following 1 packages:" 
Update output... "" 
Update output... "Upgrading pcbsd-utils: 1389730624 -> 1391939371" 
Update output... "" 
Update output... "The upgrade will require 7 KB more space" 
Update output... "" 
Update output... "16 MB to be downloaded" 
Update output... "Looking up fbsd-update.pcbsd.org mirrors... none found." 
Update output... "Fetching metadata signature for 10.0-RELEASE from fbsd-update.pcbsd.org... done." 
Update output... "Fetching metadata index... done." 
Update output... "Inspecting system... done." 
Update output... "Preparing to download files... done." 
Update output... "" 
Update output... "The following files are affected by updates, but no changes have" 
Update output... "been downloaded because the files have been modified locally:" 
Update output... "/var/db/mergemaster.mtree" 
Update output... "" 
Update output... "No updates needed to update system to 10.0-RELEASE-p5." 
"Plone" false 
Starting Update Check... 
Finished Update Check... 
Locale: "sl" 
"Looking up fbsd-update.pcbsd.org mirrors... none found." 
"Fetching public key from fbsd-update.pcbsd.org... done." 
"Fetching metadata signature for 10.0-RELEASE from fbsd-update.pcbsd.org... done." 
"Fetching metadata index... done." 
"Fetching 2 metadata files... done." 
"Inspecting system... done." 
"Preparing to download files... done." 
"Fetching 16 patches. done." 
"Applying patches... done." 
"Fetching 30 files... done." 
"" 
"The following files are affected by updates, but no changes have" 
"been downloaded because the files have been modified locally:" 
"/var/db/mergemaster.mtree" 
"" 
"The following files will be updated as part of updating to 10.0-RELEASE-p5:" 
"/bin/freebsd-version" 
"/lib/libutil.so.9" 
"/lib/libzpool.so.2" 
"/usr/bin/gcore" 
"/usr/bin/ztest" 
"/usr/include/sys/user.h" 
"/usr/lib/libbsnmp.a" 
"/usr/lib/libbsnmp.so.6" 
"/usr/lib/libbsnmp_p.a" 
"/usr/lib/libgssapi_krb5.a" 
"/usr/lib/libgssapi_krb5.so.10" 
"/usr/lib/libgssapi_krb5_p.a" 
"/usr/lib/libprocstat.a" 
"/usr/lib/libprocstat.so.1" 
"/usr/lib/libprocstat_p.a" 
"/usr/lib/libssl.a" 
"/usr/lib/libssl.so.7" 
"/usr/lib/libssl_p.a" 
"/usr/lib/libutil.a" 
"/usr/lib/libutil_p.a" 
"/usr/lib/libzpool.a" 
"/usr/lib32/libbsnmp.a" 
"/usr/lib32/libbsnmp.so.6" 
"/usr/lib32/libbsnmp_p.a" 
"/usr/lib32/libgssapi_krb5.a" 
"/usr/lib32/libgssapi_krb5.so.10" 
"/usr/lib32/libgssapi_krb5_p.a" 
"/usr/lib32/libprocstat.a" 
"/usr/lib32/libprocstat.so.1" 
"/usr/lib32/libprocstat_p.a" 
"/usr/lib32/libssl.a" 
"/usr/lib32/libssl.so.7" 
"/usr/lib32/libssl_p.a" 
"/usr/lib32/libutil.a" 
"/usr/lib32/libutil.so.9" 
"/usr/lib32/libutil_p.a" 
"/usr/lib32/libzpool.a" 
"/usr/lib32/libzpool.so.2" 
"/usr/sbin/bhyve" 
"/usr/sbin/bsnmpd" 
"/usr/sbin/ntpd" 
"/usr/sbin/pkg" 
"/usr/share/doc/psd/13.rcs/paper.ascii.gz" 
"/usr/share/keys/pkg/trusted/pkg.freebsd.org.2013102301" 
"/usr/share/misc/magic" 
"/usr/share/misc/magic.mgc" 
/tmp/.fbsdupdesc                              100% of 3441  B   29 MBps 00m00s
(("FreeBSD Security Updates", "FBSDUPDATE", "Update Details:", " ", "The following files will be updated:", "/bin/freebsd-version", "/lib/libutil.so.9", "/lib/libzpool.so.2", "/usr/bin/gcore", "/usr/bin/ztest", "/usr/include/sys/user.h", "/usr/lib/libbsnmp.a", "/usr/lib/libbsnmp.so.6", "/usr/lib/libbsnmp_p.a", "/usr/lib/libgssapi_krb5.a", "/usr/lib/libgssapi_krb5.so.10", "/usr/lib/libgssapi_krb5_p.a", "/usr/lib/libprocstat.a", "/usr/lib/libprocstat.so.1", "/usr/lib/libprocstat_p.a", "/usr/lib/libssl.a", "/usr/lib/libssl.so.7", "/usr/lib/libssl_p.a", "/usr/lib/libutil.a", "/usr/lib/libutil_p.a", "/usr/lib/libzpool.a", "/usr/lib32/libbsnmp.a", "/usr/lib32/libbsnmp.so.6", "/usr/lib32/libbsnmp_p.a", "/usr/lib32/libgssapi_krb5.a", "/usr/lib32/libgssapi_krb5.so.10", "/usr/lib32/libgssapi_krb5_p.a", "/usr/lib32/libprocstat.a", "/usr/lib32/libprocstat.so.1", "/usr/lib32/libprocstat_p.a", "/usr/lib32/libssl.a", "/usr/lib32/libssl.so.7", "/usr/lib32/libssl_p.a", "/usr/lib32/libutil.a", "/usr/lib32/libutil.so.9", "/usr/lib32/libutil_p.a", "/usr/lib32/libzpool.a", "/usr/lib32/libzpool.so.2", "/usr/sbin/bhyve", "/usr/sbin/bsnmpd", "/usr/sbin/ntpd", "/usr/sbin/pkg", "/usr/share/doc/psd/13.rcs/paper.ascii.gz", "/usr/share/keys/pkg/trusted/pkg.freebsd.org.2013102301", "/usr/share/misc/magic", "/usr/share/misc/magic.mgc") )  
Update started 
"Installing updates... done." 
Finished Update 
Updates all Finished 
"Looking up fbsd-update.pcbsd.org mirrors... none found." 
"Fetching metadata signature for 10.0-RELEASE from fbsd-update.pcbsd.org... done." 
"Fetching metadata index... done." 
"Inspecting system... done." 
"Preparing to download files... done." 
"" 
"The following files are affected by updates, but no changes have" 
"been downloaded because the files have been modified locally:" 
"/var/db/mergemaster.mtree" 
"" 
"No updates needed to update system to 10.0-RELEASE-p5." 

But when I click Export button, this pops up:

() 
klauncher(22381) kdemain: No DBUS session-bus found. Check if you have started the DBUS server. 
kdeinit4: Communication error with launcher. Exiting!
Segmentation fault

I really do not have Dbus icon in my status bar, but I do not recall disabling it.

comment:3 Changed 5 months ago by helix

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:4 Changed 5 months ago by joshms

  • Owner set to kris
  • Status changed from reopened to new

comment:5 Changed 5 months ago by kris

I'm not seeing this here. Maybe it has to do with the way you started the warden? Try this as your user:

% pc-su warden-gui

Does that work?

comment:6 Changed 4 months ago by helix

Nop, here is the output (system with Slovenian regional settings):
[helix@pcbsd] ~% pc-su warden-gui
Geslo:sudo: warden-gui: ukaza ni bilo mogoÄe najti
[helix@pcbsd] ~% (up char should be č btw - mogoče)

I have tried on another system I installed from scratch (system with errors in upgraded from 9.2) and it is also unable to find warden-gui command (only warden is available). This other system has English settings:

[helix@joule] ~% pc-su warden-gui
Password:sudo: warden-gui: command not found
[helix@joule] ~% warden 
Desktop/   Documents/ Downloads/ GNUstep/   Images/    Music/     Videos/    bin/       web/
[helix@joule] ~% pc-su warden 
Warden version 1.3
---------------------------------
Available commands

Type in help <command> for information and usage about that command

         help - This help file
          gui - Launch the GUI menu
         auto - Toggles the autostart flag for a jail
      bspkgng - BootStrap pkgng and setup TrueOS repo
      checkup - Check for updates to a jail
       chroot - Launches chroot into a jail 
       create - Creates a new jail 
      details - Display usage details about a jail
       delete - Deletes a jail
       export - Exports a jail to a .wdn file
        fstab - Start users $EDITOR on jails custom fstab
          get - Gets options list for a jail
       import - Imports a jail from a .wdn file
         list - Lists the installed jails
         pkgs - Lists the installed packages in a jail
         pbis - Lists the installed pbi's in a jail
          set - Sets options for a jail
        start - Start a jail
         stop - Stops a jail
         type - Set the jail type (pluginjail|portjail|standard)
     template - Manage jail templates
    zfsmksnap - Create a ZFS snapshot of a jail 
 zfslistclone - List clones of jail snapshots
  zfslistsnap - List snapshots of a jail
 zfsclonesnap - Clone a jail snapshot
  zfscronsnap - Schedule snapshot creation via cron
zfsrevertsnap - Revert jail to a snapshot
   zfsrmclone - Remove a clone directory
    zfsrmsnap - Remove snapshot of a jail
[helix@joule] ~% 

Last edited 4 months ago by helix (previous) (diff)

comment:7 Changed 4 months ago by helix

Sorry for previous post, I noticed one dash to many. Here is output now:

@pcbsd] ~% pc-su warden gui
Geslo:Locale: "sl" 
ID                      AUTOSTART   STATUS      TYPE        
---------------------------------------------------------------------------
Plone                   Disabled    Stopped     standard    
django                  Disabled    Stopped     standard    
ldap                    Disabled    Stopped     standard    
Starting Update Check... 
Finished Update Check... 
Checking: ".django.meta" 
"192.168.1.9/24 " 
Checking: ".ldap.meta" 
"192.168.1.3/24 " 
Checking: ".Plone.meta" 
"192.168.1.2/24 " 
Found IPS: "192.168.1.9/24 " 
Checking for details to:  "django" 
Starting Update Check... 
Found IPS: "192.168.1.3/24 " 
Checking for details to:  "ldap" 
Found IPS: "192.168.1.2/24 " 
Checking for details to:  "Plone" 
"Getting ZFS snapshots for django" 
Available Snapshots: () 
"Getting ZFS snapshots for django" 
Available Snapshots: () 
"Getting ZFS snapshots for django" 
Available Snapshots: () 
"Getting ZFS snapshots for Plone" 
Available Snapshots: ("2014-02-04-22-42-39", "2014-02-19-19-29-44") 
"Getting ZFS clones for Plone" 
Available Clones: () 
Update output... "Checking for jail updates to django..." 
Update output... "################################################" 
Update output... "Updating repository catalogue" 
Update output... "New version of pkg detected; it needs to be installed first." 
Update output... "Upgrades have been requested for the following 1 packages:" 
Update output... "" 
Update output... "Upgrading pkg: 1.2.4_1 -> 1.2.6"                                                                       
Update output... ""                                                                                                      
Update output... "The upgrade will require 16 KB more space" 
Update output... "" 
Update output... "2 MB to be downloaded" 
Update output... "Looking up fbsd-update.pcbsd.org mirrors... none found." 
Update output... "Fetching metadata signature for 10.0-RELEASE from fbsd-update.pcbsd.org... done." 
Update output... "Fetching metadata index... done." 
Update output... "Inspecting system... done." 
Update output... "Preparing to download files... done." 
Update output... "" 
Update output... "The following files are affected by updates, but no changes have" 
Update output... "been downloaded because the files have been modified locally:" 
Update output... "/var/db/mergemaster.mtree" 
Update output... "" 
Update output... "No updates needed to update system to 10.0-RELEASE-p6." 
"django" false 
Starting Update Check... 
Update output... "Checking for jail updates to ldap..." 
Update output... "################################################" 
Update output... "Updating repository catalogue" 
Update output... "New version of pkg detected; it needs to be installed first." 
Update output... "Upgrades have been requested for the following 1 packages:" 
Update output... "" 
Update output... "Upgrading pkg: 1.2.4_1 -> 1.2.6" 
Update output... "" 
Update output... "The upgrade will require 16 KB more space" 
Update output... "" 
Update output... "2 MB to be downloaded" 
Update output... "Looking up fbsd-update.pcbsd.org mirrors... none found." 
Update output... "Fetching metadata signature for 10.0-RELEASE from fbsd-update.pcbsd.org... done." 
Update output... "Fetching metadata index... done." 
Update output... "Inspecting system... done." 
Update output... "Preparing to download files... done." 
Update output... "" 
Update output... "The following files are affected by updates, but no changes have" 
Update output... "been downloaded because the files have been modified locally:" 
Update output... "/var/db/mergemaster.mtree" 
Update output... "" 
Update output... "No updates needed to update system to 10.0-RELEASE-p6." 
"ldap" false 
Starting Update Check... 
Update output... "Checking for jail updates to Plone..." 
Update output... "################################################" 
Update output... "Updating repository catalogue" 
Update output... "New version of pkg detected; it needs to be installed first." 
Update output... "Upgrades have been requested for the following 1 packages:" 
Update output... "" 
Update output... "Upgrading pkg: 1.2.4_1 -> 1.2.6" 
Update output... "" 
Update output... "The upgrade will require 16 KB more space" 
Update output... "" 
Update output... "2 MB to be downloaded" 
Update output... "Looking up fbsd-update.pcbsd.org mirrors... none found." 
Update output... "Fetching metadata signature for 10.0-RELEASE from fbsd-update.pcbsd.org... done." 
Update output... "Fetching metadata index... done." 
Update output... "Inspecting system... done." 
Update output... "Preparing to download files... done." 
Update output... "" 
Update output... "The following files are affected by updates, but no changes have" 
Update output... "been downloaded because the files have been modified locally:" 
Update output... "/var/db/mergemaster.mtree" 
Update output... "" 
Update output... "No updates needed to update system to 10.0-RELEASE-p6." 
"Plone" false 
Starting Update Check... 
Finished Update Check... 

GUI just "hangs" at this point with Exporting Jail:

I have made ps axu and top available in txt attached

Last edited 4 months ago by helix (previous) (diff)

Changed 4 months ago by helix

process list

comment:8 Changed 4 months ago by helix

To eliminate doubt that export does not work because of upgraded system from 9.2, I have export jail via command line and reimported jail on freshly installed 10-RELEASE system. Export does not work either: http://youtu.be/lV36vzubKBQ
I have waited for almost two hours with same result.

Last edited 4 months ago by helix (previous) (diff)

comment:9 Changed 4 months ago by kris

Ok, looking at your video it looks like this is the older version of warden. We have fixed this in git it looks like. Can you rebuild this way?

% git clone https://github.com/pcbsd/pcbsd.git
% cd pcbsd/src-sh/warden
% sudo make install
% cd ../../src-qt4/warden-gui
% qmake-qt4
% make
% sudo make install

Then re-test. Does it still hang? This git version will be going out as our quarterly package update very soon.

comment:10 Changed 4 months ago by helix

I have followed those steps and tried to export once I completed upgrade of warden. Unfortunately export still does not work. I left it do it's job over night, but it just hangs at "exporting jail".

[helix@pcbsd] ~% ps axu | grep warden
helix      21369   0,0  0,1   16996   2616  -  I     7:05am  0:00,00 /bin/sh /usr/local/bin/pc-su warden gui
helix      21372   0,0  1,2  299616  50392  -  I     7:05am  0:00,29 qsudo warden gui
root       21381   0,0  0,1   56408   3772  -  I     7:05am  0:00,02 sudo -S warden gui
root       21382   0,0  0,1   16996   2976  -  I     7:05am  0:00,01 /bin/sh /usr/local/bin/warden gui
root       21399   0,0  0,9  211184  36624  -  S     7:05am  0:00,86 /usr/local/share/warden/bin/warden-gui
helix      25532   0,0  0,1   18736   2396  1  S+    7:06am  0:00,00 grep warden

comment:11 Changed 4 months ago by kris

Ok, so one thing that could be causing this is that it tries to "stop" the jail before doing the export.

Is this jail running? Can you stop it?

(as root)
# warden stop <jailname>

comment:12 Changed 4 months ago by helix

Jail is not running on the time when I click export, it is not configured to run automatically on boot.

comment:13 Changed 4 months ago by kris

Odd, lets see if it hangs via CLI then.

# warden export <jailname> --dir=/root

Does that give any errors or finish up properly?

comment:14 Changed 3 months ago by helix

Unfortunately I have reinstalled this problematic machine and now on 10-RELEASE p9 export works ok.

But I have noticed one strange thing. When testing export and then importing it, the jail will not start because I inserted IP number with zeroes in part of the ip number: 192.168.001.100 in my case. I'm used to write ip that way so I don't have to click in spaces that are separated with dots (it's kinda leftover from windows times I guess). So starting it from command line spits out:

[helix@pcbsd] ~% sudo warden start plone
jail -c path=/usr/jails/plone ip4.addr=192.168.001.100/24 host.hostname=plone allow.raw_sockets=true persist
jail: ip4.addr: not an IPv4 address: 192.168.001.100
ERROR: Failed starting jail with above command...
Unmounting /usr/jails/plone/proc

comment:15 Changed 3 months ago by helix

Forgot to mention, that I selected "Change IP" on import wizzard and there inserted the "problematic" ip with trailing zeroes. If I delete jail and go import it again (this time just with 1 instead 001) it works ok.

Changed 2 months ago by helix

comment:16 Changed 2 months ago by helix

I had two jails, one named "irc" and one "plone". I deleted irc and then wanted to export only one left - "plone". After I selected destination folder for export, it says exporting "irc" (see attachment). My ps axu shows this:
[helix@pcbsd10] ~% ps axu |grep warden
helix 2362 0.0 0.1 17156 2260 - I 11:34PM 0:00.01 /bin/sh /usr/local/bin/pc-su warden gui
helix 2365 0.0 1.1 321604 44560 - I 11:34PM 0:00.35 qsudo warden gui
root 2375 0.0 0.1 50432 3428 - I 11:34PM 0:00.28 sudo -S warden gui
root 2376 0.0 0.1 17156 2636 - I 11:34PM 0:00.01 /bin/sh /usr/local/bin/warden gui
root 2393 0.0 0.8 218688 34012 - S 11:34PM 0:01.91 /usr/local/share/warden/bin/warden-gui
helix 9709 0.0 0.1 18892 2184 1 S+ 11:50PM 0:00.00 grep warden

Running 10.0-RELEASE-p11 installed from 10.0.1 DVD (latest).

Changed 2 months ago by helix

Versions installed

comment:17 Changed 2 months ago by helix

If I close warden and start it again, export then works OK. So it is not critical bug since probably not many people will delete and export at the same time.

[helix@pcbsd10] ~% ps axu |grep warden
root 14991 0.1 0.8 214460 34844 - S 12:03AM 0:01.15 /usr/local/share/warden/bin/warden-gui
helix 14961 0.0 0.1 17156 2264 - I 12:03AM 0:00.00 /bin/sh /usr/local/bin/pc-su warden gui
helix 14964 0.0 1.1 321604 47224 - I 12:03AM 0:00.33 qsudo warden gui
root 14973 0.0 0.1 50432 3432 - I 12:03AM 0:00.28 sudo -S warden gui
root 14974 0.0 0.1 17156 2640 - I 12:03AM 0:00.01 /bin/sh /usr/local/bin/warden gui
root 17612 0.0 0.1 17156 2624 - S 12:05AM 0:00.02 /bin/sh /usr/local/bin/warden export plone --dir=/root
root 17638 0.0 0.1 17156 2516 - S 12:05AM 0:00.01 /bin/sh /usr/local/share/warden/scripts/backend/exportjail.sh plone /root
helix 17837 0.0 0.1 18892 2184 1 S+ 12:06AM 0:00.00 grep warden

comment:18 Changed 8 weeks ago by kris

  • Resolution set to fixed
  • Status changed from new to closed

Ok, looks like I found that bug. It wasn't setting the export name properly before hand, still using the previous selection. I've fixed this in GIT and for several other right-click menu items.

https://github.com/pcbsd/pcbsd/commit/a7c522d466729efa35a7c9218debad9f8cbced9a

Note: See TracTickets for help on using tickets.