You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Lahiru Sandaruwan <la...@wso2.com> on 2015/03/05 17:57:52 UTC

Python agent error while processing "ArtifactUpdatedEvent" in Openstack

Hi,

See the log [1].

Am i doing anything wrong?

Thanks.

[1]

2015-03-05 21:56:06,585:INFO:Processing Artifact update event: [tenant]
-1234 [cluster] my-php.php.domain [status] None

2015-03-05 21:56:06,585:INFO:Executing git checkout

2015-03-05 21:56:06,585:DEBUG:Repo path returned : '/var/www/www'

2015-03-05 21:56:06,585:DEBUG:Cloning artifacts from
https://github.com/imesh/stratos-php-applications.git for the first time to
/var/www/www

*2015-03-05 21:56:06,585:DEBUG:Executing git clone: [tenant-id] -1234
[repo-url] https://github.com/imesh/stratos-php-applications.git
<https://github.com/imesh/stratos-php-applications.git>*

*2015-03-05 21:56:06,670:ERROR:Error processing 'ArtifactUpdatedEvent'
event*

*Traceback (most recent call last):*

*  File
"/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/subscriber/eventsubscriber.py",
line 103, in run*

*    handler(event_msg)*

*  File "agent.py", line 192, in on_artifact_updated*

*    self.__event_handler.on_artifact_updated_event(event_obj)*

  File
"/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/event/eventhandler.py",
line 209, in on_artifact_updated_event

    subscribe_run, updated = AgentGitHandler.checkout(repo_info)

  File
"/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
line 89, in checkout

    git_repo = AgentGitHandler.clone(git_repo)

  File
"/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
line 192, in clone

    Repo.clone_from(git_repo.repo_url, git_repo.local_repo_path)

  File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line 727,
in clone_from

    return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB,
**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line 682,
in _clone

    git.clone(url, path, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 219, in
<lambda>

    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 430, in
_call_process

    return self.execute(call, **_kwargs)

  File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 309, in
execute

    **subprocess_kwargs

  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__

    errread, errwrite)

  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child

    raise child_exception

OSError: [Errno 2] No such file or directory

2015-03-05 21:57:01,013:DEBUG:Message received: tenant/CompleteTenantEvent:

-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: Python agent error while processing "ArtifactUpdatedEvent" in Openstack

Posted by Chamila De Alwis <ch...@wso2.com>.
Hi Lahiru,

I tried reproducing this with the PCA integration test, but cloning works
well for me, even for several levels of non existing folder paths. Could
you also check if the git binary is installed in the cartridge?


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Thu, Mar 5, 2015 at 10:54 PM, Chamila De Alwis <ch...@wso2.com> wrote:

> Hi Lahiru,
>
> Please check if the PCA pack is upto date. This seems to be a peculiar
> error, since the PHP cartridge was functional in the Kubernetes flow
> yesterday.
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Thu, Mar 5, 2015 at 10:27 PM, Lahiru Sandaruwan <la...@wso2.com>
> wrote:
>
>> Hi,
>>
>> See the log [1].
>>
>> Am i doing anything wrong?
>>
>> Thanks.
>>
>> [1]
>>
>> 2015-03-05 21:56:06,585:INFO:Processing Artifact update event: [tenant]
>> -1234 [cluster] my-php.php.domain [status] None
>>
>> 2015-03-05 21:56:06,585:INFO:Executing git checkout
>>
>> 2015-03-05 21:56:06,585:DEBUG:Repo path returned : '/var/www/www'
>>
>> 2015-03-05 21:56:06,585:DEBUG:Cloning artifacts from
>> https://github.com/imesh/stratos-php-applications.git for the first time
>> to /var/www/www
>>
>> *2015-03-05 21:56:06,585:DEBUG:Executing git clone: [tenant-id] -1234
>> [repo-url] https://github.com/imesh/stratos-php-applications.git
>> <https://github.com/imesh/stratos-php-applications.git>*
>>
>> *2015-03-05 21:56:06,670:ERROR:Error processing 'ArtifactUpdatedEvent'
>> event*
>>
>> *Traceback (most recent call last):*
>>
>> *  File
>> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/subscriber/eventsubscriber.py",
>> line 103, in run*
>>
>> *    handler(event_msg)*
>>
>> *  File "agent.py", line 192, in on_artifact_updated*
>>
>> *    self.__event_handler.on_artifact_updated_event(event_obj)*
>>
>>   File
>> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/event/eventhandler.py",
>> line 209, in on_artifact_updated_event
>>
>>     subscribe_run, updated = AgentGitHandler.checkout(repo_info)
>>
>>   File
>> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
>> line 89, in checkout
>>
>>     git_repo = AgentGitHandler.clone(git_repo)
>>
>>   File
>> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
>> line 192, in clone
>>
>>     Repo.clone_from(git_repo.repo_url, git_repo.local_repo_path)
>>
>>   File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line
>> 727, in clone_from
>>
>>     return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB,
>> **kwargs)
>>
>>   File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line
>> 682, in _clone
>>
>>     git.clone(url, path, **kwargs)
>>
>>   File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 219, in
>> <lambda>
>>
>>     return lambda *args, **kwargs: self._call_process(name, *args,
>> **kwargs)
>>
>>   File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 430, in
>> _call_process
>>
>>     return self.execute(call, **_kwargs)
>>
>>   File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 309, in
>> execute
>>
>>     **subprocess_kwargs
>>
>>   File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
>>
>>     errread, errwrite)
>>
>>   File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
>>
>>     raise child_exception
>>
>> OSError: [Errno 2] No such file or directory
>>
>> 2015-03-05 21:57:01,013:DEBUG:Message received:
>> tenant/CompleteTenantEvent:
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Committer and PMC member, Apache Stratos,
>> Senior Software Engineer,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>

Re: Python agent error while processing "ArtifactUpdatedEvent" in Openstack

Posted by Chamila De Alwis <ch...@wso2.com>.
Hi Lahiru,

Please check if the PCA pack is upto date. This seems to be a peculiar
error, since the PHP cartridge was functional in the Kubernetes flow
yesterday.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Thu, Mar 5, 2015 at 10:27 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Hi,
>
> See the log [1].
>
> Am i doing anything wrong?
>
> Thanks.
>
> [1]
>
> 2015-03-05 21:56:06,585:INFO:Processing Artifact update event: [tenant]
> -1234 [cluster] my-php.php.domain [status] None
>
> 2015-03-05 21:56:06,585:INFO:Executing git checkout
>
> 2015-03-05 21:56:06,585:DEBUG:Repo path returned : '/var/www/www'
>
> 2015-03-05 21:56:06,585:DEBUG:Cloning artifacts from
> https://github.com/imesh/stratos-php-applications.git for the first time
> to /var/www/www
>
> *2015-03-05 21:56:06,585:DEBUG:Executing git clone: [tenant-id] -1234
> [repo-url] https://github.com/imesh/stratos-php-applications.git
> <https://github.com/imesh/stratos-php-applications.git>*
>
> *2015-03-05 21:56:06,670:ERROR:Error processing 'ArtifactUpdatedEvent'
> event*
>
> *Traceback (most recent call last):*
>
> *  File
> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/subscriber/eventsubscriber.py",
> line 103, in run*
>
> *    handler(event_msg)*
>
> *  File "agent.py", line 192, in on_artifact_updated*
>
> *    self.__event_handler.on_artifact_updated_event(event_obj)*
>
>   File
> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/event/eventhandler.py",
> line 209, in on_artifact_updated_event
>
>     subscribe_run, updated = AgentGitHandler.checkout(repo_info)
>
>   File
> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
> line 89, in checkout
>
>     git_repo = AgentGitHandler.clone(git_repo)
>
>   File
> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
> line 192, in clone
>
>     Repo.clone_from(git_repo.repo_url, git_repo.local_repo_path)
>
>   File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line
> 727, in clone_from
>
>     return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB,
> **kwargs)
>
>   File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line
> 682, in _clone
>
>     git.clone(url, path, **kwargs)
>
>   File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 219, in
> <lambda>
>
>     return lambda *args, **kwargs: self._call_process(name, *args,
> **kwargs)
>
>   File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 430, in
> _call_process
>
>     return self.execute(call, **_kwargs)
>
>   File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 309, in
> execute
>
>     **subprocess_kwargs
>
>   File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
>
>     errread, errwrite)
>
>   File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
>
>     raise child_exception
>
> OSError: [Errno 2] No such file or directory
>
> 2015-03-05 21:57:01,013:DEBUG:Message received: tenant/CompleteTenantEvent:
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>

Re: Python agent error while processing "ArtifactUpdatedEvent" in Openstack

Posted by Lahiru Sandaruwan <la...@wso2.com>.
Hi,

This was due to the git was installed before the artifact event is received
from puppet module. Fixed in f778e0f5f8361866b657eee66f920b50b6614059.

Thanks.

On Thu, Mar 5, 2015 at 10:27 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

> Hi,
>
> See the log [1].
>
> Am i doing anything wrong?
>
> Thanks.
>
> [1]
>
> 2015-03-05 21:56:06,585:INFO:Processing Artifact update event: [tenant]
> -1234 [cluster] my-php.php.domain [status] None
>
> 2015-03-05 21:56:06,585:INFO:Executing git checkout
>
> 2015-03-05 21:56:06,585:DEBUG:Repo path returned : '/var/www/www'
>
> 2015-03-05 21:56:06,585:DEBUG:Cloning artifacts from
> https://github.com/imesh/stratos-php-applications.git for the first time
> to /var/www/www
>
> *2015-03-05 21:56:06,585:DEBUG:Executing git clone: [tenant-id] -1234
> [repo-url] https://github.com/imesh/stratos-php-applications.git
> <https://github.com/imesh/stratos-php-applications.git>*
>
> *2015-03-05 21:56:06,670:ERROR:Error processing 'ArtifactUpdatedEvent'
> event*
>
> *Traceback (most recent call last):*
>
> *  File
> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/subscriber/eventsubscriber.py",
> line 103, in run*
>
> *    handler(event_msg)*
>
> *  File "agent.py", line 192, in on_artifact_updated*
>
> *    self.__event_handler.on_artifact_updated_event(event_obj)*
>
>   File
> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/event/eventhandler.py",
> line 209, in on_artifact_updated_event
>
>     subscribe_run, updated = AgentGitHandler.checkout(repo_info)
>
>   File
> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
> line 89, in checkout
>
>     git_repo = AgentGitHandler.clone(git_repo)
>
>   File
> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
> line 192, in clone
>
>     Repo.clone_from(git_repo.repo_url, git_repo.local_repo_path)
>
>   File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line
> 727, in clone_from
>
>     return cls._clone(Git(os.getcwd()), url, to_path, GitCmdObjectDB,
> **kwargs)
>
>   File "/usr/local/lib/python2.7/dist-packages/git/repo/base.py", line
> 682, in _clone
>
>     git.clone(url, path, **kwargs)
>
>   File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 219, in
> <lambda>
>
>     return lambda *args, **kwargs: self._call_process(name, *args,
> **kwargs)
>
>   File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 430, in
> _call_process
>
>     return self.execute(call, **_kwargs)
>
>   File "/usr/local/lib/python2.7/dist-packages/git/cmd.py", line 309, in
> execute
>
>     **subprocess_kwargs
>
>   File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
>
>     errread, errwrite)
>
>   File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
>
>     raise child_exception
>
> OSError: [Errno 2] No such file or directory
>
> 2015-03-05 21:57:01,013:DEBUG:Message received: tenant/CompleteTenantEvent:
>
> --
> --
> Lahiru Sandaruwan
> Committer and PMC member, Apache Stratos,
> Senior Software Engineer,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
--
Lahiru Sandaruwan
Committer and PMC member, Apache Stratos,
Senior Software Engineer,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com blog: http://lahiruwrites.blogspot.com/
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146