Erik, can you try show us exactly what command results in this message.
I don't get anything like this when I run your example through Cfengine.

M

On 01/13/2011 10:38 AM, Erik Mouw wrote:
> On Jan 13, 2011, at 10:35, Eystein Måløy Stenberg wrote:
> 
> Hi Eystein,
> 
>> In any case this is a bug (it should never print non-printable chars).
>> Please retry with Cfengine 3.1.2 (if you are on an older version), as I 
>> believe it has already been fixed..
> 
> This -is- with Cfengine 3.1.2, so whatever it is, it has not been fixed
> properly or it pops up on a different place.
> 
> 
> Regards,
> 
> Erik
> 
>> --
>> Regards
>> Eystein
>>
>> On 01/13/2011 10:04 AM, Erik Mouw wrote:
>>> Hi all,
>>>
>>> I'm writing a promise to keep a nameserver and a locking daemon for a
>>> CAD package running as a specific user, and on one RHEL3 64 bit machine
>>> (yes I know, no longer supported by Red Hat, but we need it for legacy
>>> designs) I get the following errors:
>>>
>>> Validation: Error reading assumed integer value "Ja" =>  "-678" (found 
>>> remainder "")
>>> Validation: Error reading assumed integer value "" =>  "-678" (found 
>>> remainder "")
>>> Validation: Error reading assumed integer value "Ja" =>  "-678" (found 
>>> remainder "")
>>> Validation: Error reading assumed integer value "" =>  "-678" (found 
>>> remainder "")
>>> Validation: Error reading assumed integer value "Ja" =>  "-678" (found 
>>> remainder "")
>>> Validation: Error reading assumed integer value "" =>  "-678" (found 
>>> remainder "")
>>>
>>> However, the same promise runs just fine on RHEL4 and 5 machines.
>>>
>>> The idea behind the promise is that the nameserver and the locking daemon
>>> should be running as user "support". When they are running as another user,
>>> they should be killed. Here is the code:
>>>
>>> bundle agent cadpackage
>>> {
>>> vars:
>>>   "cadpackage_path" string =>  "/opt/cadpackage/tools/bin" ;
>>>
>>>   "nameserver" string =>  "NameServer";
>>>   "lockd" string =>  "LockDaemon";
>>>   "runas" string =>  "support";
>>>
>>> processes:
>>>  cadserv1|cadserv2|cadserv3::
>>>  "$(nameserver)"
>>>         comment         =>  "Make sure there is no Cadpackage nameserver 
>>> running as another user",
>>>         process_select  =>  find_not_cadpackage_process("$(runas)"),
>>>         signals         =>  { "term", "kill"  },
>>>         action          =>  cadpackage_check;
>>>
>>>  "$(nameserver)"
>>>         comment         =>  "Make sure Cadpackage nameserver is running",
>>>         process_select  =>  find_cadpackage_process("$(runas)"),
>>>         restart_class   =>  "restart_nameserver",
>>>         action          =>  cadpackage_check;
>>>
>>>
>>>  "$(lockd)"
>>>         comment         =>  "Make sure there is no Cadpackage locking 
>>> daemon running as another user",
>>>         process_select  =>  find_not_cadpackage_process("$(runas)"),
>>>         signals         =>  { "term", "kill"  },
>>>         action          =>  cadpackage_check;
>>>
>>>  "$(lockd)"
>>>         comment         =>  "Make sure Cadpackage locking daemon is 
>>> running",
>>>         process_select  =>  find_cadpackage_process("$(runas)"),
>>>         restart_class   =>  "restart_lockd",
>>>         action          =>  cadpackage_check;
>>>
>>> commands:
>>>  restart_nameserver::
>>>         "/bin/su $(runas) '$(cadpackage_path)/$(nameserver)'";
>>>
>>>  restart_lockd::
>>>         "$(cadpackage_path)/$(lockd) -setuid $(runas)";
>>>
>>> reports:
>>>  restart_nameserver::
>>>         "Restarted Cadpackage nameserver";
>>>
>>>  restart_lockd::
>>>         "Restarted Cadpackage locking daemon";
>>> }
>>>
>>>
>>> body action cadpackage_check
>>> {
>>>         ifelapsed       =>  "1";
>>> }
>>>
>>>
>>> body process_select find_cadpackage_process(owner)
>>> {
>>>         process_owner   =>  { "$(owner)" };
>>>         process_result  =>  "process_owner";
>>> }
>>>
>>>
>>> body process_select find_not_cadpackage_process(owner)
>>> {
>>>         process_owner   =>  { "$(owner)" };
>>>         process_result  =>  "!process_owner";
>>> }
>>>
>>>
>>> I don't think there is something obviously wrong in my code because
>>> otherwise cfengine would have told me exactly which line would contain
>>> the error, but maybe there is something subtle I'm missing?
>>>
>>>
>>> Regards,
>>>
>>> Erik
>>>
>> _______________________________________________
>> Help-cfengine mailing list
>> Help-cfengine@cfengine.org
>> https://cfengine.org/mailman/listinfo/help-cfengine
> 
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to