You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
(21) |
Nov
(8) |
Dec
(8) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(4) |
Feb
|
Mar
(9) |
Apr
(7) |
May
(4) |
Jun
|
Jul
|
Aug
(9) |
Sep
(3) |
Oct
(1) |
Nov
(1) |
Dec
|
|
From: External C. L. (CAMPUS) <ext...@ox...> - 2008-11-03 14:32:47
|
Following a discussion we had on instant messaging, here is a proof of concept to get the args of methods of the class in the func modules:
#!/usr/bin/python
import sys
sys.path.append('/usr/lib/python/site-packages/func/minion/modules/')
import inspect
modname='mount'
methodname='umount'
the_mod=__import__(modname)
name,data=inspect.getmembers(the_mod, inspect.isclass)[0]
the_class=modname+'.'+name
c=getattr(the_mod, name)
print "Module: "+modname
print "Class Name: "+the_class
print "Method: "+methodname
print "Args: ",
print [ arg for arg in inspect.getargspec(eval('c.'+methodname))[0] if arg != 'self' ]
Output:
Module: mount
Class Name: mount.MountModule
Method: umount
Args: ['dir', 'killall', 'force', 'lazy']
I think we can't rely on register_method_args(self)
I can be put in a func module... or not.
Let me know if you think this can be interesting.
Louis
-----Original Message-----
From: Marco Mornati [mailto:mmo...@by...]
Sent: Saturday, November 01, 2008 11:48 AM
To: External COILLIOT Louis (CAMPUS)
Cc: sym...@li...
Subject: Re: [Symbolic-users] FW: Operation Running
Hi Louis,
I'm making some tests with module that requires more than one parameter
(like your test module). It seems there's a problem in func-trasmit
parsing the parameter passed...
I make some tests during this w-e... I hope I could find the solution
and push it to you! ;)
Bye a have a nice w-e
Marco
On Thu, 2008-10-30 at 16:56 +0100, External COILLIOT Louis (CAMPUS)
wrote:
> Hello, I tried with the simpler func module below. Same behaviour:
>
> 2008-10-30 17:02:26,942 - INFO - Exception value: test() takes exactly 4 arguments (2 given)
> 2008-10-30 17:02:26,948 - INFO - Exception Info:
> File "/usr/lib/python2.4/site-packages/func/minion/server.py", line 136, in __call__
> rc = self.__method(*args)
>
> And still no error information getting back to the WebUI.
>
> The module is:
>
> # test_symb.py
> #!/usr/bin/env python
>
> import os
>
> try:
> from func_module import FuncModule
> except:
> class FuncModule:
> pass
>
>
> class testSymb(FuncModule):
> version = "0.0.1"
> api_version = "0.0.1"
> description = "This is a test for the Symbolic WebUI frontend"
>
> def test(self,param1,param2,param3):
> """Test the multi param passing"""
> filename='/tmp/'+param1+'-'+param2+'-'+param3
> try:
> outfile=open(filename,'w')
> outfile.close()
> except Exception, e: return str(e)
> return(filename)
>
>
> It works fine in func:
> func '*' call test_symb test pim pam poum
> {'nladev03.neptune.dkcorp.net': '/tmp/pim-pam-poum',
> 'nladev04.neptune.dkcorp.net': '/tmp/pim-pam-poum'}
>
> Louis
>
>
>
> -----Original Message-----
> From: External COILLIOT Louis (CAMPUS)
> Sent: Thursday, October 30, 2008 11:10 AM
> To: sym...@li...
> Subject: RE: [Symbolic-users] FW: Operation Running
>
> 1° database export
>
> For the database export, this is what i thought.
>
> But I can't see the definition for the symbolic operation I created:
>
> grep augeas /var/lib/symbolic/db/*
>
> /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(5,1,'2008-10-29 16:02:31.501000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438',FALSE,NULL,NULL,1,2,'')
> /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(6,1,'2008-10-29 17:50:12.182000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225299014.0967519',FALSE,NULL,NULL,1,2,'')
> /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(5,2,'2008-10-29 16:02:31.501000000','Func Async Process Lost!',2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438',FALSE,'WARN: Func Server was probably restart after command ran on client.',NULL,3,2,'')
> /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(8,1,'2008-10-29 17:53:54.177000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225299238.6513391',FALSE,NULL,NULL,1,2,'')
> /var/lib/symbolic/db/symbolicDb.script:INSERT INTO MODULE VALUES(3,0,'changeconf_augeas','Default Description','','chgParam,module_description,module_version,get_method_args,module_api_version,list_methods','changeconf_augeas')
>
> Where are Operations stored ?
>
> 2° my module
>
> Here is the module (POC version, I'm still working on it):
> #changeconf_augeas.py
>
> try:
> from func_module import FuncModule
> except:
> class FuncModule:
> pass
>
>
> class chgConf(FuncModule):
> version = "0.0.1"
> api_version = "0.0.1"
> description = "Change parameters in plain text configuration files, with the help of Augeas."
>
> def chgParam(self,fileName,param,pvalue):
> """Change a value for a config. parameter in a plain text config. file
> with the help of Augeas, a configuration API (cf http://augeas.net)
> """
> try:
> from augeas import augeas
> aug=augeas()
> except Exception, e: return str(e)
>
> path='/files/'+fileName
>
> try:
> getTest=aug.get(path+"/"+param)
> except Exception, e: return str(e)
>
> if not getTest:
> message="""Failed. Possible reasons:
> - the config file does not exist
> - the config parameter does not exist in the config file
> - Augeas does not handle the configuration format as expected"""
> return message
>
> try:
> aug.set(path+"/"+param,pvalue)
> except Exception, e: return str(e)
> try:
> aug.save()
> except Exception, e: return str(e)
>
> try:
> getTest=aug.get(path+"/"+param)
> except Exception, e: return str(e)
>
> return [fileName,param,getTest]
>
>
> In parallel I will make some new check with a very simple test module using methods with more than 1 parameter.
>
>
> Louis
>
>
>
> -----Original Message-----
> From: Marco Mornati [mailto:mmo...@by...]
> Sent: Thursday, October 30, 2008 9:46 AM
> To: External COILLIOT Louis (CAMPUS)
> Cc: sym...@li...
> Subject: Re: [Symbolic-users] FW: Operation Running
>
> On Wed, 2008-10-29 at 17:57 +0100, External COILLIOT Louis (CAMPUS)
> wrote:
>
> > I checked the func logs, I have this:
> >
> >
> >
> > 2008-10-29 17:10:00,995 - DEBUG - cn: testintegr3.neptune.dkcorp.net-CA-KEY sub_hash: 1837371380
> > 2008-10-29 17:10:00,997 - DEBUG - acls {u'testintegr3.neptune.dkcorp.net-CA-KEY-1837371380': ['*']}
> > 2008-10-29 17:10:00,997 - DEBUG - hostkey testintegr3.neptune.dkcorp.net-CA-KEY-1837371380
> > 2008-10-29 17:10:01,026 - DEBUG - (X) -------------------------------------------
> > 2008-10-29 17:10:01,029 - INFO - Exception occured: exceptions.TypeError
> > 2008-10-29 17:10:01,029 - INFO - Exception value: chgParam() takes exactly 4 arguments (2 given)
> > 2008-10-29 17:10:01,030 - INFO - Exception Info:
> > File "/usr/lib/python2.4/site-packages/func/minion/server.py", line 136, in __call__
> > rc = self.__method(*args)
> >
> >
> > So:
> > - the error doesn't get back to Symbolic
> > - there is a problem passing args
> > Did you try with more than one or two ?
> > The separator between the args in the form is really ' ' ?
> > With 'raw' func it works fine.
> > I'd like to give you an export of the piece of hsql database that defines the operation, but I don't know how.
> >
> Yes we have tested with more than one parameter... but maybe there is a
> specific problem calling that one. We are making a call using
> "func-trasmit" (so not CLI) and all "instructions" are passed through a
> yaml/json serialization.
>
> Can I have your module code to make some specific test... so I can see
> what are working wrong in that situation?
>
> To "export" the hsqldb you just need to copy the db files you can find
> in symbolic folder (if I remember well /var/lib/symbolic/db).
> >
>
> > > I don't understand your real question
> > > (...)
> > > when you are creating new operation inside Symbolic, it proposes the list of required parameter for selected method
> > That's a part of the answer I seeked for.
> >
> > > you need to add the name of server to "default" operation parameters.
> > What I mean is that I try to do that with a list of parameters, like:
> > func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes
> >
> > Param list -> /etc/ssh/sshd_config PermitRootLogin yes
> >
> >
> >
> > 3) Propose in a form (on another page?) and not "add parameter" or writing something in a list? Yes... could be better... In this moment I couldn't see Symbolic because I'm out of office. Tomorrow morning I take care to your suggestion and I'll write you an email with proposal to change this part.
> > If you have any suggestion about this... let me know.
> >
> > "add parameter" is fine but it should provide the args of the methods as parameter names (with a select form ?), I think.
> >
> > Bye
> > Marco
> >
> > ------------
> > Dott. Ing. Mornati Marco
> > Byte-Code s.r.l
> > via Antonio Cechov, 1
> > San Giuliano Milanese (MI)
> > E-Mail: mmo...@by...
> > Mob. +39 3388246643
> > Int. +39 02 45074942
> > Tel. +39 02 9840047
> > Fax. +39 02 98247475
> >
> > ----- Original Message -----
> > From: "External COILLIOT Louis (CAMPUS)" <ext...@ox...>
> > To: mmo...@by..., "stephane.dobbelaere" <ste...@th...>
> > Cc: "luca foppiano" <lu...@fo...>, "franck.lemaire" <fra...@th...>
> > Sent: Wednesday, October 29, 2008 4:49:01 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
> > Subject: Operation Running
> >
> > Hello Marco,
> >
> > I have one problem and 2 questions.
> >
> >
> > 1° Problem
> >
> > I try to get this operation working with Symbolic:
> >
> > func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes
> >
> > It works fine with func console mode:
> > {'nladev03.neptune.dkcorp.net': ['/etc/ssh/sshd_config',
> > 'PermitRootLogin',
> > 'yes'],
> > 'nladev04.neptune.dkcorp.net': ['/etc/ssh/sshd_config',
> > 'PermitRootLogin',
> > 'yes']}
> >
> >
> > You can see the operation from Symbolic in attachment.
> >
> > But it gets stuck with Symbolic in 'Operation running'. See the log:
> >
> > 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212)
> > 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212)
> > --->1 ["/etc/ssh/sshd_config PermitRootLogin no"]
> > 16:02:33.324 DEBUG Calling JSon Values: {"module":"changeconf_augeas","nforks":1,"method":"chgParam","parameters":"/etc/ssh/sshd_config PermitRootLogin no ","async":true,"clients":"nladev03.neptune.dkcorp.net"}
> > 16:02:33.325 DEBUG Command to execute: ["func-transmit", "-j"]
> > 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"]
> > 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"]
> > 16:02:38.155 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438
> > 16:02:38.157 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"}
> > 16:02:38.158 DEBUG Command to execute: ["func-transmit", "-j"]
> > 16:02:38.671 DEBUG Process Response: [3,{}]
> > 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]]
> > 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]]
> > 16:02:38.688 DEBUG Job Partial!
> > 16:02:38.688 DEBUG Job Partial!
> > 16:02:43.160 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438
> > 16:02:43.160 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"}
> > 16:02:43.160 DEBUG Command to execute: ["func-transmit", "-j"]
> > 16:02:43.547 DEBUG Process Response: [3,{}]
> > 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]]
> > 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]]
> > 16:02:43.550 DEBUG Job Partial!
> > 16:02:43.550 DEBUG Job Partial!
> >
> >
> > 2° question
> >
> > I got a method chgParam that takes more than on param
> > def chgParam(self,fileName,param,pvalue):
> > (...)
> >
> > I can't find examples with more than on param.
> > For example, to check a service you need only the service name:
> > def status(self, service_name):
> > (...)
> >
> > In Symbolic 'Service status' operation you use:
> > User Parameter: 'Service Name' Type 'Text' Desc '...'
> >
> > How does 'Service Name' match with the attribute 'service_name' of the method 'status' ?
> >
> > What if there are more than one parameter ?
> > Is there a match between the order of the User Parameter list and the order of the attributes in the method ?
> >
> > 3° question
> >
> > Don't you think it could be more clear to propose the methods attributes list in the form for an operation ?
> >
> > Let me know.
> >
> > Louis
> >
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> > Build the coolest Linux based applications with Moblin SDK & win great prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > Symbolic-users mailing list
> > Sym...@li...
> > https://lists.sourceforge.net/lists/listinfo/symbolic-users
> --
> Dott. Ing. Mornati Marco
> Byte-Code s.r.l
> via Antonio Cechov, 1
> San Giuliano Milanese (MI)
> E-Mail: mmo...@by...
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Symbolic-users mailing list
> Sym...@li...
> https://lists.sourceforge.net/lists/listinfo/symbolic-users
--
Dott. Ing. Mornati Marco
Byte-Code s.r.l
via Antonio Cechov, 1
San Giuliano Milanese (MI)
E-Mail: mmo...@by...
|
|
From: Marco M. <mmo...@by...> - 2008-11-01 10:49:48
|
Hi Louis,
I'm making some tests with module that requires more than one parameter
(like your test module). It seems there's a problem in func-trasmit
parsing the parameter passed...
I make some tests during this w-e... I hope I could find the solution
and push it to you! ;)
Bye a have a nice w-e
Marco
On Thu, 2008-10-30 at 16:56 +0100, External COILLIOT Louis (CAMPUS)
wrote:
> Hello, I tried with the simpler func module below. Same behaviour:
>
> 2008-10-30 17:02:26,942 - INFO - Exception value: test() takes exactly 4 arguments (2 given)
> 2008-10-30 17:02:26,948 - INFO - Exception Info:
> File "/usr/lib/python2.4/site-packages/func/minion/server.py", line 136, in __call__
> rc = self.__method(*args)
>
> And still no error information getting back to the WebUI.
>
> The module is:
>
> # test_symb.py
> #!/usr/bin/env python
>
> import os
>
> try:
> from func_module import FuncModule
> except:
> class FuncModule:
> pass
>
>
> class testSymb(FuncModule):
> version = "0.0.1"
> api_version = "0.0.1"
> description = "This is a test for the Symbolic WebUI frontend"
>
> def test(self,param1,param2,param3):
> """Test the multi param passing"""
> filename='/tmp/'+param1+'-'+param2+'-'+param3
> try:
> outfile=open(filename,'w')
> outfile.close()
> except Exception, e: return str(e)
> return(filename)
>
>
> It works fine in func:
> func '*' call test_symb test pim pam poum
> {'nladev03.neptune.dkcorp.net': '/tmp/pim-pam-poum',
> 'nladev04.neptune.dkcorp.net': '/tmp/pim-pam-poum'}
>
> Louis
>
>
>
> -----Original Message-----
> From: External COILLIOT Louis (CAMPUS)
> Sent: Thursday, October 30, 2008 11:10 AM
> To: sym...@li...
> Subject: RE: [Symbolic-users] FW: Operation Running
>
> 1° database export
>
> For the database export, this is what i thought.
>
> But I can't see the definition for the symbolic operation I created:
>
> grep augeas /var/lib/symbolic/db/*
>
> /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(5,1,'2008-10-29 16:02:31.501000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438',FALSE,NULL,NULL,1,2,'')
> /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(6,1,'2008-10-29 17:50:12.182000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225299014.0967519',FALSE,NULL,NULL,1,2,'')
> /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(5,2,'2008-10-29 16:02:31.501000000','Func Async Process Lost!',2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438',FALSE,'WARN: Func Server was probably restart after command ran on client.',NULL,3,2,'')
> /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(8,1,'2008-10-29 17:53:54.177000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225299238.6513391',FALSE,NULL,NULL,1,2,'')
> /var/lib/symbolic/db/symbolicDb.script:INSERT INTO MODULE VALUES(3,0,'changeconf_augeas','Default Description','','chgParam,module_description,module_version,get_method_args,module_api_version,list_methods','changeconf_augeas')
>
> Where are Operations stored ?
>
> 2° my module
>
> Here is the module (POC version, I'm still working on it):
> #changeconf_augeas.py
>
> try:
> from func_module import FuncModule
> except:
> class FuncModule:
> pass
>
>
> class chgConf(FuncModule):
> version = "0.0.1"
> api_version = "0.0.1"
> description = "Change parameters in plain text configuration files, with the help of Augeas."
>
> def chgParam(self,fileName,param,pvalue):
> """Change a value for a config. parameter in a plain text config. file
> with the help of Augeas, a configuration API (cf http://augeas.net)
> """
> try:
> from augeas import augeas
> aug=augeas()
> except Exception, e: return str(e)
>
> path='/files/'+fileName
>
> try:
> getTest=aug.get(path+"/"+param)
> except Exception, e: return str(e)
>
> if not getTest:
> message="""Failed. Possible reasons:
> - the config file does not exist
> - the config parameter does not exist in the config file
> - Augeas does not handle the configuration format as expected"""
> return message
>
> try:
> aug.set(path+"/"+param,pvalue)
> except Exception, e: return str(e)
> try:
> aug.save()
> except Exception, e: return str(e)
>
> try:
> getTest=aug.get(path+"/"+param)
> except Exception, e: return str(e)
>
> return [fileName,param,getTest]
>
>
> In parallel I will make some new check with a very simple test module using methods with more than 1 parameter.
>
>
> Louis
>
>
>
> -----Original Message-----
> From: Marco Mornati [mailto:mmo...@by...]
> Sent: Thursday, October 30, 2008 9:46 AM
> To: External COILLIOT Louis (CAMPUS)
> Cc: sym...@li...
> Subject: Re: [Symbolic-users] FW: Operation Running
>
> On Wed, 2008-10-29 at 17:57 +0100, External COILLIOT Louis (CAMPUS)
> wrote:
>
> > I checked the func logs, I have this:
> >
> >
> >
> > 2008-10-29 17:10:00,995 - DEBUG - cn: testintegr3.neptune.dkcorp.net-CA-KEY sub_hash: 1837371380
> > 2008-10-29 17:10:00,997 - DEBUG - acls {u'testintegr3.neptune.dkcorp.net-CA-KEY-1837371380': ['*']}
> > 2008-10-29 17:10:00,997 - DEBUG - hostkey testintegr3.neptune.dkcorp.net-CA-KEY-1837371380
> > 2008-10-29 17:10:01,026 - DEBUG - (X) -------------------------------------------
> > 2008-10-29 17:10:01,029 - INFO - Exception occured: exceptions.TypeError
> > 2008-10-29 17:10:01,029 - INFO - Exception value: chgParam() takes exactly 4 arguments (2 given)
> > 2008-10-29 17:10:01,030 - INFO - Exception Info:
> > File "/usr/lib/python2.4/site-packages/func/minion/server.py", line 136, in __call__
> > rc = self.__method(*args)
> >
> >
> > So:
> > - the error doesn't get back to Symbolic
> > - there is a problem passing args
> > Did you try with more than one or two ?
> > The separator between the args in the form is really ' ' ?
> > With 'raw' func it works fine.
> > I'd like to give you an export of the piece of hsql database that defines the operation, but I don't know how.
> >
> Yes we have tested with more than one parameter... but maybe there is a
> specific problem calling that one. We are making a call using
> "func-trasmit" (so not CLI) and all "instructions" are passed through a
> yaml/json serialization.
>
> Can I have your module code to make some specific test... so I can see
> what are working wrong in that situation?
>
> To "export" the hsqldb you just need to copy the db files you can find
> in symbolic folder (if I remember well /var/lib/symbolic/db).
> >
>
> > > I don't understand your real question
> > > (...)
> > > when you are creating new operation inside Symbolic, it proposes the list of required parameter for selected method
> > That's a part of the answer I seeked for.
> >
> > > you need to add the name of server to "default" operation parameters.
> > What I mean is that I try to do that with a list of parameters, like:
> > func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes
> >
> > Param list -> /etc/ssh/sshd_config PermitRootLogin yes
> >
> >
> >
> > 3) Propose in a form (on another page?) and not "add parameter" or writing something in a list? Yes... could be better... In this moment I couldn't see Symbolic because I'm out of office. Tomorrow morning I take care to your suggestion and I'll write you an email with proposal to change this part.
> > If you have any suggestion about this... let me know.
> >
> > "add parameter" is fine but it should provide the args of the methods as parameter names (with a select form ?), I think.
> >
> > Bye
> > Marco
> >
> > ------------
> > Dott. Ing. Mornati Marco
> > Byte-Code s.r.l
> > via Antonio Cechov, 1
> > San Giuliano Milanese (MI)
> > E-Mail: mmo...@by...
> > Mob. +39 3388246643
> > Int. +39 02 45074942
> > Tel. +39 02 9840047
> > Fax. +39 02 98247475
> >
> > ----- Original Message -----
> > From: "External COILLIOT Louis (CAMPUS)" <ext...@ox...>
> > To: mmo...@by..., "stephane.dobbelaere" <ste...@th...>
> > Cc: "luca foppiano" <lu...@fo...>, "franck.lemaire" <fra...@th...>
> > Sent: Wednesday, October 29, 2008 4:49:01 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
> > Subject: Operation Running
> >
> > Hello Marco,
> >
> > I have one problem and 2 questions.
> >
> >
> > 1° Problem
> >
> > I try to get this operation working with Symbolic:
> >
> > func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes
> >
> > It works fine with func console mode:
> > {'nladev03.neptune.dkcorp.net': ['/etc/ssh/sshd_config',
> > 'PermitRootLogin',
> > 'yes'],
> > 'nladev04.neptune.dkcorp.net': ['/etc/ssh/sshd_config',
> > 'PermitRootLogin',
> > 'yes']}
> >
> >
> > You can see the operation from Symbolic in attachment.
> >
> > But it gets stuck with Symbolic in 'Operation running'. See the log:
> >
> > 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212)
> > 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212)
> > --->1 ["/etc/ssh/sshd_config PermitRootLogin no"]
> > 16:02:33.324 DEBUG Calling JSon Values: {"module":"changeconf_augeas","nforks":1,"method":"chgParam","parameters":"/etc/ssh/sshd_config PermitRootLogin no ","async":true,"clients":"nladev03.neptune.dkcorp.net"}
> > 16:02:33.325 DEBUG Command to execute: ["func-transmit", "-j"]
> > 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"]
> > 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"]
> > 16:02:38.155 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438
> > 16:02:38.157 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"}
> > 16:02:38.158 DEBUG Command to execute: ["func-transmit", "-j"]
> > 16:02:38.671 DEBUG Process Response: [3,{}]
> > 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]]
> > 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]]
> > 16:02:38.688 DEBUG Job Partial!
> > 16:02:38.688 DEBUG Job Partial!
> > 16:02:43.160 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438
> > 16:02:43.160 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"}
> > 16:02:43.160 DEBUG Command to execute: ["func-transmit", "-j"]
> > 16:02:43.547 DEBUG Process Response: [3,{}]
> > 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]]
> > 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]]
> > 16:02:43.550 DEBUG Job Partial!
> > 16:02:43.550 DEBUG Job Partial!
> >
> >
> > 2° question
> >
> > I got a method chgParam that takes more than on param
> > def chgParam(self,fileName,param,pvalue):
> > (...)
> >
> > I can't find examples with more than on param.
> > For example, to check a service you need only the service name:
> > def status(self, service_name):
> > (...)
> >
> > In Symbolic 'Service status' operation you use:
> > User Parameter: 'Service Name' Type 'Text' Desc '...'
> >
> > How does 'Service Name' match with the attribute 'service_name' of the method 'status' ?
> >
> > What if there are more than one parameter ?
> > Is there a match between the order of the User Parameter list and the order of the attributes in the method ?
> >
> > 3° question
> >
> > Don't you think it could be more clear to propose the methods attributes list in the form for an operation ?
> >
> > Let me know.
> >
> > Louis
> >
> > -------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> > Build the coolest Linux based applications with Moblin SDK & win great prizes
> > Grand prize is a trip for two to an Open Source event anywhere in the world
> > http://moblin-contest.org/redirect.php?banner_id=100&url=/
> > _______________________________________________
> > Symbolic-users mailing list
> > Sym...@li...
> > https://lists.sourceforge.net/lists/listinfo/symbolic-users
> --
> Dott. Ing. Mornati Marco
> Byte-Code s.r.l
> via Antonio Cechov, 1
> San Giuliano Milanese (MI)
> E-Mail: mmo...@by...
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Symbolic-users mailing list
> Sym...@li...
> https://lists.sourceforge.net/lists/listinfo/symbolic-users
--
Dott. Ing. Mornati Marco
Byte-Code s.r.l
via Antonio Cechov, 1
San Giuliano Milanese (MI)
E-Mail: mmo...@by...
|
|
From: mmornati <mmo...@by...> - 2008-10-31 21:08:13
|
Cool. Finally... I hope will work. I have some other changes un commit but they needed tests before. Tomorrow during the day I hope I could finish all things. I made also some tests for module with more than one parameters and seems work but not in all cases. So I need more tests un find out the problem. Bonne soirée. Salut Marco -- msg. originale -- Oggetto: Re: Installing Symbolic Da: "stephane dobbelaere" <sd....@gm...> Data: 31/10/2008 17:58 Hello the rpm is generate now by the git , and symbolic seems run I hope test it this week-end Enjoy 2008/10/31 Marco Mornati <mmo...@by...> > Hi Stephane, > > it seems strange to me, but now Symbolic for me works with default > configuration. > > I commit just one file on git to change a little bit the tomcat > configuration... but I got that error until I correctly set my Func. > In fact, with first tests Symbolic can't talk with any minion and so > database was filled just with user and role parameters but no func > method and operation were added. > I don't know why, but at the end, this situation report the HSQLDB > problem that was the cause of tomcat startup. > > Anyway... try pulling from git and building a new rpm. To be sure delete > the folder /var/lib/symbolic before a new installation. (before any > update remember to stop the symbolic daemon, I see that you can make an > rpm -e or rpm -Uvh with symbolic started... but I think it's not so good > to make this kind of operation with the application running). > > Now I take a look to mysql configuration. > Let me know if you can use Symbolic now. > > Bye > Marco > -- > Dott. Ing. Mornati Marco > Byte-Code s.r.l > via Antonio Cechov, 1 > San Giuliano Milanese (MI) > E-Mail: mmo...@by... > |
|
From: stephane d. <sd....@gm...> - 2008-10-31 17:58:24
|
Hello the rpm is generate now by the git , and symbolic seems run I hope test it this week-end Enjoy 2008/10/31 Marco Mornati <mmo...@by...> > Hi Stephane, > > it seems strange to me, but now Symbolic for me works with default > configuration. > > I commit just one file on git to change a little bit the tomcat > configuration... but I got that error until I correctly set my Func. > In fact, with first tests Symbolic can't talk with any minion and so > database was filled just with user and role parameters but no func > method and operation were added. > I don't know why, but at the end, this situation report the HSQLDB > problem that was the cause of tomcat startup. > > Anyway... try pulling from git and building a new rpm. To be sure delete > the folder /var/lib/symbolic before a new installation. (before any > update remember to stop the symbolic daemon, I see that you can make an > rpm -e or rpm -Uvh with symbolic started... but I think it's not so good > to make this kind of operation with the application running). > > Now I take a look to mysql configuration. > Let me know if you can use Symbolic now. > > Bye > Marco > -- > Dott. Ing. Mornati Marco > Byte-Code s.r.l > via Antonio Cechov, 1 > San Giuliano Milanese (MI) > E-Mail: mmo...@by... > |
|
From: Marco M. <mmo...@by...> - 2008-10-31 14:17:44
|
On Fri, 2008-10-31 at 15:12 +0100, Luca Foppiano wrote: > On Fri, 2008-10-31 at 15:03 +0100, stephane.dobbelaere wrote: > > so we can do an update without stop symbolic service ? > > I think so, but the point is another, is not a good idea to put inside > rpm the directive to stop the service. :-) We have discuss about this problem here in the office (Luca is not here with us but out of office)... and it seems a reasonable to stop it and restart it (if it was running during update). So the script reported by Luois is really what we need :) > > probably is better to stop symbolic service before update, but I think > after you update to a new version, the container (tomcat) should restart > automatically the application. Yep... But we have seen that there are some problems during the "auto" restart of the application by tomcat (nothing work after update) :) > > Probably is better (at least now, in future we maybe will change it) to > stop symbolic (with a service symbolic stop), update it and restart... We could try with the auto start/stop of the service... if all works correctly we leave it... else we will try a different solution! ;) Bye now... thank Luois for your help (I make a cut an past on the spec and add your name to the change log ;)) Bye Marco > > luca -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmo...@by... |
|
From: Luca F. <lfo...@by...> - 2008-10-31 14:12:10
|
On Fri, 2008-10-31 at 15:03 +0100, stephane.dobbelaere wrote: > so we can do an update without stop symbolic service ? I think so, but the point is another, is not a good idea to put inside rpm the directive to stop the service. :-) probably is better to stop symbolic service before update, but I think after you update to a new version, the container (tomcat) should restart automatically the application. Probably is better (at least now, in future we maybe will change it) to stop symbolic (with a service symbolic stop), update it and restart... luca -- Today is Prickle-Prickle, the 12nd day of The Aftermath in the YOLD 3174 Think twice before speaking, but don't say "think think click click". |
|
From: External C. L. (CAMPUS) <ext...@ox...> - 2008-10-31 14:10:10
|
Sure you can do it in the spec file. You just need to be sure that it is what you want to do.
Something like:
%pre
test -f /etc/init.d/symbolic
if [ $? -eq 0 ];then
/etc/init.d/symbolic status | grep -q running
if [ $? -eq 0 ];then
/etc/init.d/symbolic stop
fi
fi
# (...)
%post
/sbin/chkconfig --add symbolic
RL=$(/sbin/runlevel | awk '{print $2}')
/sbin/chkconfig --list symbolic | grep -q "$RL:on"
if [ $? -eq 0 ];then
/etc/init.d/symbolic start
fi
-----Original Message-----
From: Marco Mornati [mailto:mmo...@by...]
Sent: Friday, October 31, 2008 2:36 PM
To: stephane.dobbelaere
Cc: sym...@li...
Subject: Re: [Symbolic-users] Installing Symbolic
On Fri, 2008-10-31 at 14:36 +0100, stephane.dobbelaere wrote:
> Hi Marco
> for the update rpm , yes I don't stop symbolic.
> But I think the rpm must be do that .
>
> Because if we update a machine
> with yum update . you don't stop all service before .
> so It will be good to implement the stop symbolic in the rpm .
Yep I think the same thing... I'm not sure we can stop the service
inside spec file... but maybe we can check if it's running and stop the
installation.
Anyway... you right... and thanks! :D
Bye
Marco
>
> Enjoy
>
> Le vendredi 31 octobre 2008 à 12:40 +0100, Marco Mornati a écrit :
> > Hi Stephane,
> >
> > it seems strange to me, but now Symbolic for me works with default
> > configuration.
> >
> > I commit just one file on git to change a little bit the tomcat
> > configuration... but I got that error until I correctly set my Func.
> > In fact, with first tests Symbolic can't talk with any minion and so
> > database was filled just with user and role parameters but no func
> > method and operation were added.
> > I don't know why, but at the end, this situation report the HSQLDB
> > problem that was the cause of tomcat startup.
> >
> > Anyway... try pulling from git and building a new rpm. To be sure delete
> > the folder /var/lib/symbolic before a new installation. (before any
> > update remember to stop the symbolic daemon, I see that you can make an
> > rpm -e or rpm -Uvh with symbolic started... but I think it's not so good
> > to make this kind of operation with the application running).
> >
> > Now I take a look to mysql configuration.
> > Let me know if you can use Symbolic now.
> >
> > Bye
> > Marco
--
Dott. Ing. Mornati Marco
Byte-Code s.r.l
via Antonio Cechov, 1
San Giuliano Milanese (MI)
E-Mail: mmo...@by...
|
|
From: stephane.dobbelaere <ste...@th...> - 2008-10-31 14:03:49
|
so we can do an update without stop symbolic service ? Le vendredi 31 octobre 2008 à 14:51 +0100, Luca Foppiano a écrit : > On Fri, 2008-10-31 at 14:36 +0100, stephane.dobbelaere wrote: > > Hi Marco > > for the update rpm , yes I don't stop symbolic. > > But I think the rpm must be do that . > > > > Because if we update a machine > > with yum update . you don't stop all service before . > > so It will be good to implement the stop symbolic in the rpm . > > uhm, I don't think is the best idea to stop a service during updating, > AFAIK you should restart after updating... I'm taking the apache > example... (after updating you have to restart or, better, reload it). > > Luca |
|
From: Luca F. <lfo...@by...> - 2008-10-31 13:51:50
|
On Fri, 2008-10-31 at 14:36 +0100, stephane.dobbelaere wrote: > Hi Marco > for the update rpm , yes I don't stop symbolic. > But I think the rpm must be do that . > > Because if we update a machine > with yum update . you don't stop all service before . > so It will be good to implement the stop symbolic in the rpm . uhm, I don't think is the best idea to stop a service during updating, AFAIK you should restart after updating... I'm taking the apache example... (after updating you have to restart or, better, reload it). Luca -- Today is Prickle-Prickle, the 12nd day of The Aftermath in the YOLD 3174 Science is what happens when preconception meets verification. |
|
From: stephane.dobbelaere <ste...@th...> - 2008-10-31 13:45:39
|
Hi Louis Can you help us to this point howto stop a service before update it with the rpm ? Thanks Le vendredi 31 octobre 2008 à 14:36 +0100, Marco Mornati a écrit : > > On Fri, 2008-10-31 at 14:36 +0100, stephane.dobbelaere wrote: > > Hi Marco > > for the update rpm , yes I don't stop symbolic. > > But I think the rpm must be do that . > > > > Because if we update a machine > > with yum update . you don't stop all service before . > > so It will be good to implement the stop symbolic in the rpm . > Yep I think the same thing... I'm not sure we can stop the service > inside spec file... but maybe we can check if it's running and stop the > installation. > > Anyway... you right... and thanks! :D > > Bye > Marco > > > > Enjoy > > > > Le vendredi 31 octobre 2008 à 12:40 +0100, Marco Mornati a écrit : > > > Hi Stephane, > > > > > > it seems strange to me, but now Symbolic for me works with default > > > configuration. > > > > > > I commit just one file on git to change a little bit the tomcat > > > configuration... but I got that error until I correctly set my Func. > > > In fact, with first tests Symbolic can't talk with any minion and so > > > database was filled just with user and role parameters but no func > > > method and operation were added. > > > I don't know why, but at the end, this situation report the HSQLDB > > > problem that was the cause of tomcat startup. > > > > > > Anyway... try pulling from git and building a new rpm. To be sure delete > > > the folder /var/lib/symbolic before a new installation. (before any > > > update remember to stop the symbolic daemon, I see that you can make an > > > rpm -e or rpm -Uvh with symbolic started... but I think it's not so good > > > to make this kind of operation with the application running). > > > > > > Now I take a look to mysql configuration. > > > Let me know if you can use Symbolic now. > > > > > > Bye > > > Marco |
|
From: Marco M. <mmo...@by...> - 2008-10-31 13:37:58
|
On Fri, 2008-10-31 at 14:36 +0100, stephane.dobbelaere wrote: > Hi Marco > for the update rpm , yes I don't stop symbolic. > But I think the rpm must be do that . > > Because if we update a machine > with yum update . you don't stop all service before . > so It will be good to implement the stop symbolic in the rpm . Yep I think the same thing... I'm not sure we can stop the service inside spec file... but maybe we can check if it's running and stop the installation. Anyway... you right... and thanks! :D Bye Marco > > Enjoy > > Le vendredi 31 octobre 2008 à 12:40 +0100, Marco Mornati a écrit : > > Hi Stephane, > > > > it seems strange to me, but now Symbolic for me works with default > > configuration. > > > > I commit just one file on git to change a little bit the tomcat > > configuration... but I got that error until I correctly set my Func. > > In fact, with first tests Symbolic can't talk with any minion and so > > database was filled just with user and role parameters but no func > > method and operation were added. > > I don't know why, but at the end, this situation report the HSQLDB > > problem that was the cause of tomcat startup. > > > > Anyway... try pulling from git and building a new rpm. To be sure delete > > the folder /var/lib/symbolic before a new installation. (before any > > update remember to stop the symbolic daemon, I see that you can make an > > rpm -e or rpm -Uvh with symbolic started... but I think it's not so good > > to make this kind of operation with the application running). > > > > Now I take a look to mysql configuration. > > Let me know if you can use Symbolic now. > > > > Bye > > Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmo...@by... |
|
From: stephane.dobbelaere <ste...@th...> - 2008-10-31 13:36:36
|
Hi Marco for the update rpm , yes I don't stop symbolic. But I think the rpm must be do that . Because if we update a machine with yum update . you don't stop all service before . so It will be good to implement the stop symbolic in the rpm . Enjoy Le vendredi 31 octobre 2008 à 12:40 +0100, Marco Mornati a écrit : > Hi Stephane, > > it seems strange to me, but now Symbolic for me works with default > configuration. > > I commit just one file on git to change a little bit the tomcat > configuration... but I got that error until I correctly set my Func. > In fact, with first tests Symbolic can't talk with any minion and so > database was filled just with user and role parameters but no func > method and operation were added. > I don't know why, but at the end, this situation report the HSQLDB > problem that was the cause of tomcat startup. > > Anyway... try pulling from git and building a new rpm. To be sure delete > the folder /var/lib/symbolic before a new installation. (before any > update remember to stop the symbolic daemon, I see that you can make an > rpm -e or rpm -Uvh with symbolic started... but I think it's not so good > to make this kind of operation with the application running). > > Now I take a look to mysql configuration. > Let me know if you can use Symbolic now. > > Bye > Marco |
|
From: Marco M. <mmo...@by...> - 2008-10-31 11:59:50
|
Hi Stephane, it seems strange to me, but now Symbolic for me works with default configuration. I commit just one file on git to change a little bit the tomcat configuration... but I got that error until I correctly set my Func. In fact, with first tests Symbolic can't talk with any minion and so database was filled just with user and role parameters but no func method and operation were added. I don't know why, but at the end, this situation report the HSQLDB problem that was the cause of tomcat startup. Anyway... try pulling from git and building a new rpm. To be sure delete the folder /var/lib/symbolic before a new installation. (before any update remember to stop the symbolic daemon, I see that you can make an rpm -e or rpm -Uvh with symbolic started... but I think it's not so good to make this kind of operation with the application running). Now I take a look to mysql configuration. Let me know if you can use Symbolic now. Bye Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmo...@by... |
|
From: Marco M. <mmo...@by...> - 2008-10-31 09:28:43
|
Hi everybody, here you are the script as I promised to help you during build process of symbolic. What you need is just to set rpmbuild (yum install rpmbuild ;))... feel free to ask us if you get any kind of problem during setup of this "tool". Then change the script properties (at the beginning of the script) as you prefer (maybe should be better to leave Symbolic as name of the application :P). ./buildSource-symbolic.sh (or sh buildSource-symbolic.sh) That's all! This script download each time from git all the source file... maybe (if you see that it became a really slow process) we can change a little bit making a git pull after the first time. Was to be sure that you will always have a really fresh symbolic sources. Let me know if all works correctly Bye Marco PS Is an OpenSource script made by Luca and changed by me... so if you need it... you can naturally reuse! :P -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmo...@by... |
|
From: External C. L. (CAMPUS) <ext...@ox...> - 2008-10-30 15:56:20
|
Hello, I tried with the simpler func module below. Same behaviour:
2008-10-30 17:02:26,942 - INFO - Exception value: test() takes exactly 4 arguments (2 given)
2008-10-30 17:02:26,948 - INFO - Exception Info:
File "/usr/lib/python2.4/site-packages/func/minion/server.py", line 136, in __call__
rc = self.__method(*args)
And still no error information getting back to the WebUI.
The module is:
# test_symb.py
#!/usr/bin/env python
import os
try:
from func_module import FuncModule
except:
class FuncModule:
pass
class testSymb(FuncModule):
version = "0.0.1"
api_version = "0.0.1"
description = "This is a test for the Symbolic WebUI frontend"
def test(self,param1,param2,param3):
"""Test the multi param passing"""
filename='/tmp/'+param1+'-'+param2+'-'+param3
try:
outfile=open(filename,'w')
outfile.close()
except Exception, e: return str(e)
return(filename)
It works fine in func:
func '*' call test_symb test pim pam poum
{'nladev03.neptune.dkcorp.net': '/tmp/pim-pam-poum',
'nladev04.neptune.dkcorp.net': '/tmp/pim-pam-poum'}
Louis
-----Original Message-----
From: External COILLIOT Louis (CAMPUS)
Sent: Thursday, October 30, 2008 11:10 AM
To: sym...@li...
Subject: RE: [Symbolic-users] FW: Operation Running
1° database export
For the database export, this is what i thought.
But I can't see the definition for the symbolic operation I created:
grep augeas /var/lib/symbolic/db/*
/var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(5,1,'2008-10-29 16:02:31.501000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438',FALSE,NULL,NULL,1,2,'')
/var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(6,1,'2008-10-29 17:50:12.182000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225299014.0967519',FALSE,NULL,NULL,1,2,'')
/var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(5,2,'2008-10-29 16:02:31.501000000','Func Async Process Lost!',2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438',FALSE,'WARN: Func Server was probably restart after command ran on client.',NULL,3,2,'')
/var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(8,1,'2008-10-29 17:53:54.177000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225299238.6513391',FALSE,NULL,NULL,1,2,'')
/var/lib/symbolic/db/symbolicDb.script:INSERT INTO MODULE VALUES(3,0,'changeconf_augeas','Default Description','','chgParam,module_description,module_version,get_method_args,module_api_version,list_methods','changeconf_augeas')
Where are Operations stored ?
2° my module
Here is the module (POC version, I'm still working on it):
#changeconf_augeas.py
try:
from func_module import FuncModule
except:
class FuncModule:
pass
class chgConf(FuncModule):
version = "0.0.1"
api_version = "0.0.1"
description = "Change parameters in plain text configuration files, with the help of Augeas."
def chgParam(self,fileName,param,pvalue):
"""Change a value for a config. parameter in a plain text config. file
with the help of Augeas, a configuration API (cf http://augeas.net)
"""
try:
from augeas import augeas
aug=augeas()
except Exception, e: return str(e)
path='/files/'+fileName
try:
getTest=aug.get(path+"/"+param)
except Exception, e: return str(e)
if not getTest:
message="""Failed. Possible reasons:
- the config file does not exist
- the config parameter does not exist in the config file
- Augeas does not handle the configuration format as expected"""
return message
try:
aug.set(path+"/"+param,pvalue)
except Exception, e: return str(e)
try:
aug.save()
except Exception, e: return str(e)
try:
getTest=aug.get(path+"/"+param)
except Exception, e: return str(e)
return [fileName,param,getTest]
In parallel I will make some new check with a very simple test module using methods with more than 1 parameter.
Louis
-----Original Message-----
From: Marco Mornati [mailto:mmo...@by...]
Sent: Thursday, October 30, 2008 9:46 AM
To: External COILLIOT Louis (CAMPUS)
Cc: sym...@li...
Subject: Re: [Symbolic-users] FW: Operation Running
On Wed, 2008-10-29 at 17:57 +0100, External COILLIOT Louis (CAMPUS)
wrote:
> I checked the func logs, I have this:
>
>
>
> 2008-10-29 17:10:00,995 - DEBUG - cn: testintegr3.neptune.dkcorp.net-CA-KEY sub_hash: 1837371380
> 2008-10-29 17:10:00,997 - DEBUG - acls {u'testintegr3.neptune.dkcorp.net-CA-KEY-1837371380': ['*']}
> 2008-10-29 17:10:00,997 - DEBUG - hostkey testintegr3.neptune.dkcorp.net-CA-KEY-1837371380
> 2008-10-29 17:10:01,026 - DEBUG - (X) -------------------------------------------
> 2008-10-29 17:10:01,029 - INFO - Exception occured: exceptions.TypeError
> 2008-10-29 17:10:01,029 - INFO - Exception value: chgParam() takes exactly 4 arguments (2 given)
> 2008-10-29 17:10:01,030 - INFO - Exception Info:
> File "/usr/lib/python2.4/site-packages/func/minion/server.py", line 136, in __call__
> rc = self.__method(*args)
>
>
> So:
> - the error doesn't get back to Symbolic
> - there is a problem passing args
> Did you try with more than one or two ?
> The separator between the args in the form is really ' ' ?
> With 'raw' func it works fine.
> I'd like to give you an export of the piece of hsql database that defines the operation, but I don't know how.
>
Yes we have tested with more than one parameter... but maybe there is a
specific problem calling that one. We are making a call using
"func-trasmit" (so not CLI) and all "instructions" are passed through a
yaml/json serialization.
Can I have your module code to make some specific test... so I can see
what are working wrong in that situation?
To "export" the hsqldb you just need to copy the db files you can find
in symbolic folder (if I remember well /var/lib/symbolic/db).
>
> > I don't understand your real question
> > (...)
> > when you are creating new operation inside Symbolic, it proposes the list of required parameter for selected method
> That's a part of the answer I seeked for.
>
> > you need to add the name of server to "default" operation parameters.
> What I mean is that I try to do that with a list of parameters, like:
> func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes
>
> Param list -> /etc/ssh/sshd_config PermitRootLogin yes
>
>
>
> 3) Propose in a form (on another page?) and not "add parameter" or writing something in a list? Yes... could be better... In this moment I couldn't see Symbolic because I'm out of office. Tomorrow morning I take care to your suggestion and I'll write you an email with proposal to change this part.
> If you have any suggestion about this... let me know.
>
> "add parameter" is fine but it should provide the args of the methods as parameter names (with a select form ?), I think.
>
> Bye
> Marco
>
> ------------
> Dott. Ing. Mornati Marco
> Byte-Code s.r.l
> via Antonio Cechov, 1
> San Giuliano Milanese (MI)
> E-Mail: mmo...@by...
> Mob. +39 3388246643
> Int. +39 02 45074942
> Tel. +39 02 9840047
> Fax. +39 02 98247475
>
> ----- Original Message -----
> From: "External COILLIOT Louis (CAMPUS)" <ext...@ox...>
> To: mmo...@by..., "stephane.dobbelaere" <ste...@th...>
> Cc: "luca foppiano" <lu...@fo...>, "franck.lemaire" <fra...@th...>
> Sent: Wednesday, October 29, 2008 4:49:01 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna
> Subject: Operation Running
>
> Hello Marco,
>
> I have one problem and 2 questions.
>
>
> 1° Problem
>
> I try to get this operation working with Symbolic:
>
> func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes
>
> It works fine with func console mode:
> {'nladev03.neptune.dkcorp.net': ['/etc/ssh/sshd_config',
> 'PermitRootLogin',
> 'yes'],
> 'nladev04.neptune.dkcorp.net': ['/etc/ssh/sshd_config',
> 'PermitRootLogin',
> 'yes']}
>
>
> You can see the operation from Symbolic in attachment.
>
> But it gets stuck with Symbolic in 'Operation running'. See the log:
>
> 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212)
> 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212)
> --->1 ["/etc/ssh/sshd_config PermitRootLogin no"]
> 16:02:33.324 DEBUG Calling JSon Values: {"module":"changeconf_augeas","nforks":1,"method":"chgParam","parameters":"/etc/ssh/sshd_config PermitRootLogin no ","async":true,"clients":"nladev03.neptune.dkcorp.net"}
> 16:02:33.325 DEBUG Command to execute: ["func-transmit", "-j"]
> 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"]
> 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"]
> 16:02:38.155 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438
> 16:02:38.157 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"}
> 16:02:38.158 DEBUG Command to execute: ["func-transmit", "-j"]
> 16:02:38.671 DEBUG Process Response: [3,{}]
> 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]]
> 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]]
> 16:02:38.688 DEBUG Job Partial!
> 16:02:38.688 DEBUG Job Partial!
> 16:02:43.160 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438
> 16:02:43.160 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"}
> 16:02:43.160 DEBUG Command to execute: ["func-transmit", "-j"]
> 16:02:43.547 DEBUG Process Response: [3,{}]
> 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]]
> 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]]
> 16:02:43.550 DEBUG Job Partial!
> 16:02:43.550 DEBUG Job Partial!
>
>
> 2° question
>
> I got a method chgParam that takes more than on param
> def chgParam(self,fileName,param,pvalue):
> (...)
>
> I can't find examples with more than on param.
> For example, to check a service you need only the service name:
> def status(self, service_name):
> (...)
>
> In Symbolic 'Service status' operation you use:
> User Parameter: 'Service Name' Type 'Text' Desc '...'
>
> How does 'Service Name' match with the attribute 'service_name' of the method 'status' ?
>
> What if there are more than one parameter ?
> Is there a match between the order of the User Parameter list and the order of the attributes in the method ?
>
> 3° question
>
> Don't you think it could be more clear to propose the methods attributes list in the form for an operation ?
>
> Let me know.
>
> Louis
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Symbolic-users mailing list
> Sym...@li...
> https://lists.sourceforge.net/lists/listinfo/symbolic-users
--
Dott. Ing. Mornati Marco
Byte-Code s.r.l
via Antonio Cechov, 1
San Giuliano Milanese (MI)
E-Mail: mmo...@by...
|
|
From: External C. L. (CAMPUS) <ext...@ox...> - 2008-10-30 10:10:06
|
1° database export For the database export, this is what i thought. But I can't see the definition for the symbolic operation I created: grep augeas /var/lib/symbolic/db/* /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(5,1,'2008-10-29 16:02:31.501000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438',FALSE,NULL,NULL,1,2,'') /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(6,1,'2008-10-29 17:50:12.182000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225299014.0967519',FALSE,NULL,NULL,1,2,'') /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(5,2,'2008-10-29 16:02:31.501000000','Func Async Process Lost!',2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438',FALSE,'WARN: Func Server was probably restart after command ran on client.',NULL,3,2,'') /var/lib/symbolic/db/symbolicDb.log:INSERT INTO OPERATION_LOG VALUES(8,1,'2008-10-29 17:53:54.177000000',NULL,2,5,'nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225299238.6513391',FALSE,NULL,NULL,1,2,'') /var/lib/symbolic/db/symbolicDb.script:INSERT INTO MODULE VALUES(3,0,'changeconf_augeas','Default Description','','chgParam,module_description,module_version,get_method_args,module_api_version,list_methods','changeconf_augeas') Where are Operations stored ? 2° my module Here is the module (POC version, I'm still working on it): #changeconf_augeas.py try: from func_module import FuncModule except: class FuncModule: pass class chgConf(FuncModule): version = "0.0.1" api_version = "0.0.1" description = "Change parameters in plain text configuration files, with the help of Augeas." def chgParam(self,fileName,param,pvalue): """Change a value for a config. parameter in a plain text config. file with the help of Augeas, a configuration API (cf http://augeas.net) """ try: from augeas import augeas aug=augeas() except Exception, e: return str(e) path='/files/'+fileName try: getTest=aug.get(path+"/"+param) except Exception, e: return str(e) if not getTest: message="""Failed. Possible reasons: - the config file does not exist - the config parameter does not exist in the config file - Augeas does not handle the configuration format as expected""" return message try: aug.set(path+"/"+param,pvalue) except Exception, e: return str(e) try: aug.save() except Exception, e: return str(e) try: getTest=aug.get(path+"/"+param) except Exception, e: return str(e) return [fileName,param,getTest] In parallel I will make some new check with a very simple test module using methods with more than 1 parameter. Louis -----Original Message----- From: Marco Mornati [mailto:mmo...@by...] Sent: Thursday, October 30, 2008 9:46 AM To: External COILLIOT Louis (CAMPUS) Cc: sym...@li... Subject: Re: [Symbolic-users] FW: Operation Running On Wed, 2008-10-29 at 17:57 +0100, External COILLIOT Louis (CAMPUS) wrote: > I checked the func logs, I have this: > > > > 2008-10-29 17:10:00,995 - DEBUG - cn: testintegr3.neptune.dkcorp.net-CA-KEY sub_hash: 1837371380 > 2008-10-29 17:10:00,997 - DEBUG - acls {u'testintegr3.neptune.dkcorp.net-CA-KEY-1837371380': ['*']} > 2008-10-29 17:10:00,997 - DEBUG - hostkey testintegr3.neptune.dkcorp.net-CA-KEY-1837371380 > 2008-10-29 17:10:01,026 - DEBUG - (X) ------------------------------------------- > 2008-10-29 17:10:01,029 - INFO - Exception occured: exceptions.TypeError > 2008-10-29 17:10:01,029 - INFO - Exception value: chgParam() takes exactly 4 arguments (2 given) > 2008-10-29 17:10:01,030 - INFO - Exception Info: > File "/usr/lib/python2.4/site-packages/func/minion/server.py", line 136, in __call__ > rc = self.__method(*args) > > > So: > - the error doesn't get back to Symbolic > - there is a problem passing args > Did you try with more than one or two ? > The separator between the args in the form is really ' ' ? > With 'raw' func it works fine. > I'd like to give you an export of the piece of hsql database that defines the operation, but I don't know how. > Yes we have tested with more than one parameter... but maybe there is a specific problem calling that one. We are making a call using "func-trasmit" (so not CLI) and all "instructions" are passed through a yaml/json serialization. Can I have your module code to make some specific test... so I can see what are working wrong in that situation? To "export" the hsqldb you just need to copy the db files you can find in symbolic folder (if I remember well /var/lib/symbolic/db). > > > I don't understand your real question > > (...) > > when you are creating new operation inside Symbolic, it proposes the list of required parameter for selected method > That's a part of the answer I seeked for. > > > you need to add the name of server to "default" operation parameters. > What I mean is that I try to do that with a list of parameters, like: > func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes > > Param list -> /etc/ssh/sshd_config PermitRootLogin yes > > > > 3) Propose in a form (on another page?) and not "add parameter" or writing something in a list? Yes... could be better... In this moment I couldn't see Symbolic because I'm out of office. Tomorrow morning I take care to your suggestion and I'll write you an email with proposal to change this part. > If you have any suggestion about this... let me know. > > "add parameter" is fine but it should provide the args of the methods as parameter names (with a select form ?), I think. > > Bye > Marco > > ------------ > Dott. Ing. Mornati Marco > Byte-Code s.r.l > via Antonio Cechov, 1 > San Giuliano Milanese (MI) > E-Mail: mmo...@by... > Mob. +39 3388246643 > Int. +39 02 45074942 > Tel. +39 02 9840047 > Fax. +39 02 98247475 > > ----- Original Message ----- > From: "External COILLIOT Louis (CAMPUS)" <ext...@ox...> > To: mmo...@by..., "stephane.dobbelaere" <ste...@th...> > Cc: "luca foppiano" <lu...@fo...>, "franck.lemaire" <fra...@th...> > Sent: Wednesday, October 29, 2008 4:49:01 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna > Subject: Operation Running > > Hello Marco, > > I have one problem and 2 questions. > > > 1° Problem > > I try to get this operation working with Symbolic: > > func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes > > It works fine with func console mode: > {'nladev03.neptune.dkcorp.net': ['/etc/ssh/sshd_config', > 'PermitRootLogin', > 'yes'], > 'nladev04.neptune.dkcorp.net': ['/etc/ssh/sshd_config', > 'PermitRootLogin', > 'yes']} > > > You can see the operation from Symbolic in attachment. > > But it gets stuck with Symbolic in 'Operation running'. See the log: > > 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212) > 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212) > --->1 ["/etc/ssh/sshd_config PermitRootLogin no"] > 16:02:33.324 DEBUG Calling JSon Values: {"module":"changeconf_augeas","nforks":1,"method":"chgParam","parameters":"/etc/ssh/sshd_config PermitRootLogin no ","async":true,"clients":"nladev03.neptune.dkcorp.net"} > 16:02:33.325 DEBUG Command to execute: ["func-transmit", "-j"] > 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"] > 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"] > 16:02:38.155 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438 > 16:02:38.157 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"} > 16:02:38.158 DEBUG Command to execute: ["func-transmit", "-j"] > 16:02:38.671 DEBUG Process Response: [3,{}] > 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]] > 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]] > 16:02:38.688 DEBUG Job Partial! > 16:02:38.688 DEBUG Job Partial! > 16:02:43.160 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438 > 16:02:43.160 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"} > 16:02:43.160 DEBUG Command to execute: ["func-transmit", "-j"] > 16:02:43.547 DEBUG Process Response: [3,{}] > 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]] > 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]] > 16:02:43.550 DEBUG Job Partial! > 16:02:43.550 DEBUG Job Partial! > > > 2° question > > I got a method chgParam that takes more than on param > def chgParam(self,fileName,param,pvalue): > (...) > > I can't find examples with more than on param. > For example, to check a service you need only the service name: > def status(self, service_name): > (...) > > In Symbolic 'Service status' operation you use: > User Parameter: 'Service Name' Type 'Text' Desc '...' > > How does 'Service Name' match with the attribute 'service_name' of the method 'status' ? > > What if there are more than one parameter ? > Is there a match between the order of the User Parameter list and the order of the attributes in the method ? > > 3° question > > Don't you think it could be more clear to propose the methods attributes list in the form for an operation ? > > Let me know. > > Louis > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Symbolic-users mailing list > Sym...@li... > https://lists.sourceforge.net/lists/listinfo/symbolic-users -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmo...@by... |
|
From: Marco M. <mmo...@by...> - 2008-10-30 08:48:03
|
On Wed, 2008-10-29 at 17:57 +0100, External COILLIOT Louis (CAMPUS) wrote: > I checked the func logs, I have this: > > > > 2008-10-29 17:10:00,995 - DEBUG - cn: testintegr3.neptune.dkcorp.net-CA-KEY sub_hash: 1837371380 > 2008-10-29 17:10:00,997 - DEBUG - acls {u'testintegr3.neptune.dkcorp.net-CA-KEY-1837371380': ['*']} > 2008-10-29 17:10:00,997 - DEBUG - hostkey testintegr3.neptune.dkcorp.net-CA-KEY-1837371380 > 2008-10-29 17:10:01,026 - DEBUG - (X) ------------------------------------------- > 2008-10-29 17:10:01,029 - INFO - Exception occured: exceptions.TypeError > 2008-10-29 17:10:01,029 - INFO - Exception value: chgParam() takes exactly 4 arguments (2 given) > 2008-10-29 17:10:01,030 - INFO - Exception Info: > File "/usr/lib/python2.4/site-packages/func/minion/server.py", line 136, in __call__ > rc = self.__method(*args) > > > So: > - the error doesn't get back to Symbolic > - there is a problem passing args > Did you try with more than one or two ? > The separator between the args in the form is really ' ' ? > With 'raw' func it works fine. > I'd like to give you an export of the piece of hsql database that defines the operation, but I don't know how. > Yes we have tested with more than one parameter... but maybe there is a specific problem calling that one. We are making a call using "func-trasmit" (so not CLI) and all "instructions" are passed through a yaml/json serialization. Can I have your module code to make some specific test... so I can see what are working wrong in that situation? To "export" the hsqldb you just need to copy the db files you can find in symbolic folder (if I remember well /var/lib/symbolic/db). > > > I don't understand your real question > > (...) > > when you are creating new operation inside Symbolic, it proposes the list of required parameter for selected method > That's a part of the answer I seeked for. > > > you need to add the name of server to "default" operation parameters. > What I mean is that I try to do that with a list of parameters, like: > func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes > > Param list -> /etc/ssh/sshd_config PermitRootLogin yes > > > > 3) Propose in a form (on another page?) and not "add parameter" or writing something in a list? Yes... could be better... In this moment I couldn't see Symbolic because I'm out of office. Tomorrow morning I take care to your suggestion and I'll write you an email with proposal to change this part. > If you have any suggestion about this... let me know. > > "add parameter" is fine but it should provide the args of the methods as parameter names (with a select form ?), I think. > > Bye > Marco > > ------------ > Dott. Ing. Mornati Marco > Byte-Code s.r.l > via Antonio Cechov, 1 > San Giuliano Milanese (MI) > E-Mail: mmo...@by... > Mob. +39 3388246643 > Int. +39 02 45074942 > Tel. +39 02 9840047 > Fax. +39 02 98247475 > > ----- Original Message ----- > From: "External COILLIOT Louis (CAMPUS)" <ext...@ox...> > To: mmo...@by..., "stephane.dobbelaere" <ste...@th...> > Cc: "luca foppiano" <lu...@fo...>, "franck.lemaire" <fra...@th...> > Sent: Wednesday, October 29, 2008 4:49:01 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna > Subject: Operation Running > > Hello Marco, > > I have one problem and 2 questions. > > > 1° Problem > > I try to get this operation working with Symbolic: > > func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes > > It works fine with func console mode: > {'nladev03.neptune.dkcorp.net': ['/etc/ssh/sshd_config', > 'PermitRootLogin', > 'yes'], > 'nladev04.neptune.dkcorp.net': ['/etc/ssh/sshd_config', > 'PermitRootLogin', > 'yes']} > > > You can see the operation from Symbolic in attachment. > > But it gets stuck with Symbolic in 'Operation running'. See the log: > > 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212) > 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212) > --->1 ["/etc/ssh/sshd_config PermitRootLogin no"] > 16:02:33.324 DEBUG Calling JSon Values: {"module":"changeconf_augeas","nforks":1,"method":"chgParam","parameters":"/etc/ssh/sshd_config PermitRootLogin no ","async":true,"clients":"nladev03.neptune.dkcorp.net"} > 16:02:33.325 DEBUG Command to execute: ["func-transmit", "-j"] > 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"] > 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"] > 16:02:38.155 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438 > 16:02:38.157 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"} > 16:02:38.158 DEBUG Command to execute: ["func-transmit", "-j"] > 16:02:38.671 DEBUG Process Response: [3,{}] > 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]] > 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]] > 16:02:38.688 DEBUG Job Partial! > 16:02:38.688 DEBUG Job Partial! > 16:02:43.160 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438 > 16:02:43.160 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"} > 16:02:43.160 DEBUG Command to execute: ["func-transmit", "-j"] > 16:02:43.547 DEBUG Process Response: [3,{}] > 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]] > 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]] > 16:02:43.550 DEBUG Job Partial! > 16:02:43.550 DEBUG Job Partial! > > > 2° question > > I got a method chgParam that takes more than on param > def chgParam(self,fileName,param,pvalue): > (...) > > I can't find examples with more than on param. > For example, to check a service you need only the service name: > def status(self, service_name): > (...) > > In Symbolic 'Service status' operation you use: > User Parameter: 'Service Name' Type 'Text' Desc '...' > > How does 'Service Name' match with the attribute 'service_name' of the method 'status' ? > > What if there are more than one parameter ? > Is there a match between the order of the User Parameter list and the order of the attributes in the method ? > > 3° question > > Don't you think it could be more clear to propose the methods attributes list in the form for an operation ? > > Let me know. > > Louis > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Symbolic-users mailing list > Sym...@li... > https://lists.sourceforge.net/lists/listinfo/symbolic-users -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmo...@by... |
|
From: External C. L. (CAMPUS) <ext...@ox...> - 2008-10-29 17:29:13
|
I forward this to the symbolic mailing list where it should take place. Louis Coilliot -----Original Message----- From: External COILLIOT Louis (CAMPUS) Sent: Wednesday, October 29, 2008 5:31 PM To: 'Marco Mornati' Cc: luca foppiano; franck.lemaire; stephane.dobbelaere Subject: RE: Operation Running -----Original Message----- From: Marco Mornati [mailto:mmo...@by...] Sent: Wednesday, October 29, 2008 5:01 PM To: External COILLIOT Louis (CAMPUS) Cc: luca foppiano; franck.lemaire; stephane.dobbelaere Subject: Re: Operation Running Hi Louis, and thank you too for all tests you are doing on symbolic. 1) Inside Symbolic all operation are ran with "aync" mode. What I can see in your log is that Symbolic/Certmaster hasn't received the response from the inions. Could be something wrong with "async" call for your module. Try to look if func log say something or if it has the correct answer... in this case I need to look inside Symbolic to see if there is any error in parsing the answer. I checked the func logs, I have this: 2008-10-29 17:10:00,995 - DEBUG - cn: testintegr3.neptune.dkcorp.net-CA-KEY sub_hash: 1837371380 2008-10-29 17:10:00,997 - DEBUG - acls {u'testintegr3.neptune.dkcorp.net-CA-KEY-1837371380': ['*']} 2008-10-29 17:10:00,997 - DEBUG - hostkey testintegr3.neptune.dkcorp.net-CA-KEY-1837371380 2008-10-29 17:10:01,026 - DEBUG - (X) ------------------------------------------- 2008-10-29 17:10:01,029 - INFO - Exception occured: exceptions.TypeError 2008-10-29 17:10:01,029 - INFO - Exception value: chgParam() takes exactly 4 arguments (2 given) 2008-10-29 17:10:01,030 - INFO - Exception Info: File "/usr/lib/python2.4/site-packages/func/minion/server.py", line 136, in __call__ rc = self.__method(*args) So: - the error doesn't get back to Symbolic - there is a problem passing args Did you try with more than one or two ? The separator between the args in the form is really ' ' ? With 'raw' func it works fine. I'd like to give you an export of the piece of hsql database that defines the operation, but I don't know how. 2) I don't understand your real question. What you need to do inside Symbolic is configure all parameters needed to run your operation. In case of "service" calls (Status, start, stop) what func needs is "service_name"... so what you need to configure, to make Symbolic Operation dynamic is to add a "user parameter" specifiyng which kind of information user must enter. If you want to create an operation: "Apache Service Status" where you want to check the status of httpd service on your minion you don't need to specify any user parameter but you need to add the name of server to "default" operation parameters. We planned to improve that part of Symbolic asking to func which parameter each method needs... so when you are creating new operation inside Symbolic, it proposes the list of required parameter for selected method. > I don't understand your real question > (...) > when you are creating new operation inside Symbolic, it proposes the list of required parameter for selected method That's a part of the answer I seeked for. > you need to add the name of server to "default" operation parameters. What I mean is that I try to do that with a list of parameters, like: func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes Param list -> /etc/ssh/sshd_config PermitRootLogin yes 3) Propose in a form (on another page?) and not "add parameter" or writing something in a list? Yes... could be better... In this moment I couldn't see Symbolic because I'm out of office. Tomorrow morning I take care to your suggestion and I'll write you an email with proposal to change this part. If you have any suggestion about this... let me know. "add parameter" is fine but it should provide the args of the methods as parameter names (with a select form ?), I think. Bye Marco ------------ Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmo...@by... Mob. +39 3388246643 Int. +39 02 45074942 Tel. +39 02 9840047 Fax. +39 02 98247475 ----- Original Message ----- From: "External COILLIOT Louis (CAMPUS)" <ext...@ox...> To: mmo...@by..., "stephane.dobbelaere" <ste...@th...> Cc: "luca foppiano" <lu...@fo...>, "franck.lemaire" <fra...@th...> Sent: Wednesday, October 29, 2008 4:49:01 PM GMT +01:00 Amsterdam / Berlin / Bern / Rome / Stockholm / Vienna Subject: Operation Running Hello Marco, I have one problem and 2 questions. 1° Problem I try to get this operation working with Symbolic: func '*' call changeconf_augeas chgParam /etc/ssh/sshd_config PermitRootLogin yes It works fine with func console mode: {'nladev03.neptune.dkcorp.net': ['/etc/ssh/sshd_config', 'PermitRootLogin', 'yes'], 'nladev04.neptune.dkcorp.net': ['/etc/ssh/sshd_config', 'PermitRootLogin', 'yes']} You can see the operation from Symbolic in attachment. But it gets stuck with Symbolic in 'Operation running'. See the log: 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212) 16:02:33.294 DEBUG Running OpLog ID 5 - Operation PermitRootlogin-No on nladev03.neptune.dkcorp.net (10.151.2.212) --->1 ["/etc/ssh/sshd_config PermitRootLogin no"] 16:02:33.324 DEBUG Calling JSon Values: {"module":"changeconf_augeas","nforks":1,"method":"chgParam","parameters":"/etc/ssh/sshd_config PermitRootLogin no ","async":true,"clients":"nladev03.neptune.dkcorp.net"} 16:02:33.325 DEBUG Command to execute: ["func-transmit", "-j"] 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"] 16:02:36.523 DEBUG Func raw result: ["processid":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438"] 16:02:38.155 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438 16:02:38.157 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"} 16:02:38.158 DEBUG Command to execute: ["func-transmit", "-j"] 16:02:38.671 DEBUG Process Response: [3,{}] 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]] 16:02:38.686 DEBUG Func raw-result: ["status":3, "result":[:]] 16:02:38.688 DEBUG Job Partial! 16:02:38.688 DEBUG Job Partial! 16:02:43.160 DEBUG Getting status for pid nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438 16:02:43.160 DEBUG Calling JSon Values: {"nforks":1,"method":"job_status","parameters":"nladev03.neptune.dkcorp.net-changeconf_augeas-chgParam-1225292553.724438","async":0,"clients":"*"} 16:02:43.160 DEBUG Command to execute: ["func-transmit", "-j"] 16:02:43.547 DEBUG Process Response: [3,{}] 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]] 16:02:43.549 DEBUG Func raw-result: ["status":3, "result":[:]] 16:02:43.550 DEBUG Job Partial! 16:02:43.550 DEBUG Job Partial! 2° question I got a method chgParam that takes more than on param def chgParam(self,fileName,param,pvalue): (...) I can't find examples with more than on param. For example, to check a service you need only the service name: def status(self, service_name): (...) In Symbolic 'Service status' operation you use: User Parameter: 'Service Name' Type 'Text' Desc '...' How does 'Service Name' match with the attribute 'service_name' of the method 'status' ? What if there are more than one parameter ? Is there a match between the order of the User Parameter list and the order of the attributes in the method ? 3° question Don't you think it could be more clear to propose the methods attributes list in the form for an operation ? Let me know. Louis |
|
From: stephane.dobbelaere <ste...@th...> - 2008-10-29 13:11:53
|
Hello
I test this version and I have find some "error":
when I want start a script : in the page symbolic/scripts/listTree
It's return me this message :
Message:
The operation you are trying to execute is not permitted. Access
Forbidden!
If this problem persists click the link below to send an email with
details to the Symbolic Support Center.
Send report E-Mail .
the link send email don't work
the command
when I reload certs
He find correctly the server
Check for new machines!
["eppjsx03.preprod.org", "adminoxynet", "eppjsx52.preprod.org"]
but the server not show in the "Untagged Machine"
symbolic/manager/main
Contenuto ;)
Enjoy
|
|
From: Luca F. <lfo...@by...> - 2008-10-05 12:08:27
|
On Wed, 2008-10-01 at 22:37 +0200, Luca Foppiano wrote: > On Wed, 2008-10-01 at 21:08 +0200, Luca Foppiano wrote: > > > We start to moving us toward fedorahosted (http://fedorahosted.org), our > > git need still to be syncronized but the rest (trac) is up-to date. > > Our development new address is http://fedorahosted.org/opensymbolic). sorry, the right name is now changed: is symbolic, not opensymbolic... http://fedorahosted.org/symbolic If you have your git repository, you need to modify it in the .git/config file Luca -- Today is Pungenday, the 59th day of Bureaucracy in the YOLD 3174 Are we live or on tape? |
|
From: Luca F. <lfo...@by...> - 2008-10-01 20:53:49
|
On Wed, 2008-10-01 at 21:08 +0200, Luca Foppiano wrote: > We start to moving us toward fedorahosted (http://fedorahosted.org), our > git need still to be syncronized but the rest (trac) is up-to date. > Our development new address is http://fedorahosted.org/opensymbolic). I finished right now to syncronize fedorahosted git repo, so we can use only that. Luca -- Today is Prickle-Prickle, the 55th day of Bureaucracy in the YOLD 3174 I always wake up at the crack of ice. -- Joe E. Lewis |
|
From: Luca F. <lu...@fo...> - 2008-10-01 19:36:19
|
After a lot of work and time, Symbolic 1.2.0 is finally been released :-) Here to download it: https://sourceforge.net/project/showfiles.php?group_id=225571&package_id=272889&release_id=624986 There is a lot of improvements and new features, in particular we simplify a lot installation and configuration, moving all infrastructure from grails to tomcat5. Here the changelog: - Completed XML-RPC server functions. Added some methods to use correctly from scripts - Completed Scripts exection - Added Kerberos Authentication - Database personalization moved in configuration file - RPMS Spec Changed - Producion execution moved on Tomcat - OpenJDK as default Dependency - Create a Plugin Management Execution - Multi Thread Symbolic Engine - Created Grails Plugin (Func Grails Plugin) to integrate Func Communication - Solved some minor bug fixes We start to moving us toward fedorahosted (http://fedorahosted.org), our git need still to be syncronized but the rest (trac) is up-to date. Our development new address is http://fedorahosted.org/opensymbolic). We need tester, if you are interested to give feedback to us, you are welcome ;-) Luca -- Today is Prickle-Prickle, the 55th day of Bureaucracy in the YOLD 3174 optimist, n: A bagpiper with a beeper. |
|
From: Marco M. <mmo...@by...> - 2008-06-19 12:19:12
|
A new Version of Symbolic documentation is ready on official web site (www.opensymbolic.org) Now is available also a PDF version of the guide. This version includes: - A review of all sections of the guide, especially regarding the configuration of new features introduced with Symbolic 1.1.1 release - A script section where is explained how to add and configure scripts, written in python, groovy or bash. Enjoy Marco -- Dott. Ing. Mornati Marco Byte-Code s.r.l via Antonio Cechov, 1 San Giuliano Milanese (MI) E-Mail: mmo...@by... |
|
From: Luca F. <lfo...@by...> - 2008-06-15 07:46:14
|
Symbolic 1.1.1 has been released :) https://sourceforge.net/project/showfiles.php?group_id=225571&package_id=272889&release_id=607014 features: - Fixed LDAP authentication - Fixed some command launcher bugs - Add customized validator to command line launcher - update quartz, ldap, webtest plugins - new grails version (1.0.3) new version need grails 1.0.3, which can be downloaded here: http://projects.byte-code.com/pub/bytecode/fedora9/noarch/grails-1.0.3-2.noarch.rpm bye Luca -- Today is Sweetmorn, the 20th day of Confusion in the YOLD 3174 Inspiration without perspiration is usually sterile. |
|
From: Luca F. <lfo...@by...> - 2008-06-11 09:30:31
|
Hi all, with a lot of delay I announce the 1.1.0 version, released Thursday 5.. We are planning to release the 1.1.1 version this Friday. This release correct some bugs... I'm sorry but today I'm a bit busy so I cant give a complete explanation about new features and future plans. Regards Luca -- Today is Boomtime, the 16th day of Confusion in the YOLD 3174 Why not go out on a limb? Isn't that where the fruit is? |