Re: [Bacula-users] Admin Job with console command crashing director
Hello, 2013/4/19 Marcin Haba ganius...@gmail.com For your solution I think that better will be to put your bconsole requests in a shell script. I have a question about it. I can't run an Admin Job which call an OS script instead of console commands. It is expected behavior? best regards -- Radosław Korzeniewski rados...@korzeniewski.net -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Admin Job with console command crashing director
Hello, 2013/4/19 Ana Emília Machado de Arruda emiliaarr...@gmail.com Hi Radoslaw, No, It works fine when you work with scripts (and bconsole commands inside the script). I´m sure if you open another thread (because it would appear more clear to the list if you put your subject question...) and post your script someone would help you. Did you test it? If yes, can you send a RunScript {} example for that? Thanks. best regards -- Radosław Korzeniewski rados...@korzeniewski.net -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Admin Job with console command crashing director
W dniu 19.04.2013 11:17, Radosław Korzeniewski pisze: Hello, 2013/4/19 Marcin Haba ganius...@gmail.com mailto:ganius...@gmail.com For your solution I think that better will be to put your bconsole requests in a shell script. I have a question about it. I can't run an Admin Job which call an OS script instead of console commands. It is expected behavior? Hi Radoslaw, Could you past your Job configuration with Runscript? Regards. Marcin Haba (gani) -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Admin Job with console command crashing director
Hello, 2013/4/19 ganiuszka ganius...@gmail.com Hi Radoslaw, Could you past your Job configuration with Runscript? Here you are: Job { Name = JobUpdateESXJobs JobDefs = JobDefsAdmin Client = esx-fd RunScript { RunsWhen = Before RunsOnClient = yes Command = /opt/bacula/scripts/vmlistupdate.sh } } best regards -- Radosław Korzeniewski rados...@korzeniewski.net -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Admin Job with console command crashing director
2013/4/19 Radosław Korzeniewski rados...@korzeniewski.net: Hello, 2013/4/19 ganiuszka ganius...@gmail.com Hi Radoslaw, Could you past your Job configuration with Runscript? Here you are: Job { Name = JobUpdateESXJobs JobDefs = JobDefsAdmin Client = esx-fd RunScript { RunsWhen = Before RunsOnClient = yes Command = /opt/bacula/scripts/vmlistupdate.sh } } Hi Radoslaw, Admin job type does not support to run ANY command on client by definition. It is due to Admin job omits Client resource. It is because of Admin job does not accomplish backup/restore jobs. In short, no client, no operations on client. If you want to run script by Admin job then you should define in runscript: RunsOnClient = no Thanks and good luck! Regards. Marcin Haba (gani) -- Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie za przyjaciół swoich. Jezus Chrystus -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Admin Job with console command crashing director
2013/4/17 Ana Emília Machado de Arruda emiliaarr...@gmail.com: Hello, I´m trying to run a console command from an admin job and this is crashing my director. A simple Console = list jobs, inside a RunScript directive, crashes the director (bacula-dir dead but subsys locked) and it generates a Bacula GDB traceback of bacula-dir on myDirector mail. Below is my Admin Job with a list jobs console command. My goal is a list nextvol job=\my\job\ days=1 command. Tried list jobs, list clients, and so on, all of them result in the same. When it runs on client side this does not happen. When I enter bconsole after restarting bacula, I get the messages: 17-Apr 17:24 myDirector-dir JobId 17821: console command: run BeforeJob list jobs 17-Apr 17:24 myDirector-dir JobId 0: Automatically selected Catalog: MyCatalog 17-Apr 17:24 myDirector-dir JobId 0: Using Catalog MyCatalog Hi, I have the same result as yours. After adding listing command as runscript console command, Bacula throws segmentation violation. I researched this problem. It seems that in: /usr/src/bacula-5.2.12-new/src/cats/sql.c lines 636-642: Dmsg0(800, list_result finished first loop\n); if (type == VERT_LIST) { goto vertical_list; } Dmsg1(800, list_result starts second loop looking at %d fields\n, num_fields); list_dashes(mdb, send, ctx); ^^^ variable ctx is broken, so it is not able to run list_dashes() without error. It looks like runscript directives were designed for run shell scripts/programs or bconsole commands which do not show results in tabular output. It makes sense. Summing, you found bug in Bacula. I prepared patch for this. It blocks running bconsole output for runscript. It works for me but I am not C++ programmer. Finally it does not cause segmentation violation and Director crash. I am attaching it to this message. For your solution I think that better will be to put your bconsole requests in a shell script. Regards, Marcin Haba (gani) bacula-runscript-listing-segfault.patch Description: Binary data -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] Admin Job with console command crashing director
2013/4/19 Marcin Haba ganius...@gmail.com: 2013/4/17 Ana Emília Machado de Arruda emiliaarr...@gmail.com: Hello, I´m trying to run a console command from an admin job and this is crashing my director. A simple Console = list jobs, inside a RunScript directive, crashes the director (bacula-dir dead but subsys locked) and it generates a Bacula GDB traceback of bacula-dir on myDirector mail. Below is my Admin Job with a list jobs console command. My goal is a list nextvol job=\my\job\ days=1 command. Tried list jobs, list clients, and so on, all of them result in the same. When it runs on client side this does not happen. When I enter bconsole after restarting bacula, I get the messages: 17-Apr 17:24 myDirector-dir JobId 17821: console command: run BeforeJob list jobs 17-Apr 17:24 myDirector-dir JobId 0: Automatically selected Catalog: MyCatalog 17-Apr 17:24 myDirector-dir JobId 0: Using Catalog MyCatalog Hi, I have the same result as yours. After adding listing command as runscript console command, Bacula throws segmentation violation. I researched this problem. It seems that in: /usr/src/bacula-5.2.12-new/src/cats/sql.c lines 636-642: Dmsg0(800, list_result finished first loop\n); if (type == VERT_LIST) { goto vertical_list; } Dmsg1(800, list_result starts second loop looking at %d fields\n, num_fields); list_dashes(mdb, send, ctx); ^^^ variable ctx is broken, so it is not able to run list_dashes() without error. It looks like runscript directives were designed for run shell scripts/programs or bconsole commands which do not show results in tabular output. It makes sense. Summing, you found bug in Bacula. I prepared patch for this. It blocks running bconsole output for runscript. It works for me but I am not C++ programmer. Finally it does not cause segmentation violation and Director crash. I am attaching it to this message. For your solution I think that better will be to put your bconsole requests in a shell script. Regards, Marcin Haba (gani) Hi, I forgot about an important thing. Can you request this bug in Bacula BugTracker? I think that Bacula developers should know about this bug and I am sure that they will prepare better solution for this then my solution. Thanks. Marcin Haba (gani) -- Większej miłości nikt nie ma nad tę, jak gdy kto życie swoje kładzie za przyjaciół swoich. Jezus Chrystus -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter ___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] Admin Job with console command crashing director
Hello, I´m trying to run a console command from an admin job and this is crashing my director. A simple Console = list jobs, inside a RunScript directive, crashes the director (bacula-dir dead but subsys locked) and it generates a Bacula GDB traceback of bacula-dir on myDirector mail. Below is my Admin Job with a list jobs console command. My goal is a list nextvol job=\my\job\ days=1 command. Tried list jobs, list clients, and so on, all of them result in the same. When it runs on client side this does not happen. When I enter bconsole after restarting bacula, I get the messages: 17-Apr 17:24 myDirector-dir JobId 17821: console command: run BeforeJob list jobs 17-Apr 17:24 myDirector-dir JobId 0: Automatically selected Catalog: MyCatalog 17-Apr 17:24 myDirector-dir JobId 0: Using Catalog MyCatalog Job { Name = NextVolume Type = Admin Client = myclient-fd FileSet = NextVolumeFileSet Storage = mystorage-sd Messages = Standard Max Start Delay = 0 Max Run Sched Time = 12 hours Pool = Scratch Priority = 30 Schedule = NextVolumeCycle RunScript { RunsWhen = Before RunsOnClient = no Fail Job on Error = no Console = list jobs } } # # FileSet for Job NextVolume # FileSet { Name = NextVolumeFileSet Include { Options { signature = MD5 } } } Thank you! Ana -- Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter___ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users