stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imesh Gunaratne <im...@apache.org>
Subject Re: Permission Denied while cloning
Date Fri, 23 Jan 2015 03:36:50 GMT
Thanks Chamila, this is now merged.
On Jan 21, 2015 8:17 AM, "Chamila De Alwis" <chamilad@wso2.com> wrote:

> Hi Imesh,
>
> Please merge the fixed PR #181. The application path is added to the basic
> payload only if it has a non null value.
>
> https://github.com/apache/stratos/pull/181
>
>
> Regards,
> Chamila de Alwis
> Software Engineer | WSO2 | +94772207163
> Blog: code.chamiladealwis.com
>
>
>
> On Tue, Jan 20, 2015 at 7:15 PM, Chamila De Alwis <chamilad@wso2.com>
> wrote:
>
>> Hi,
>>
>> I removed the APPLICATION_PATH from the basic payload data. This is now
>> set via Puppet in the VM scenario and in the Docker scenario it has to be
>> set in the cartridge definition, which will make it available as an
>> environment variable. Please merge the PR[1].
>>
>> [1] - https://github.com/apache/stratos/pull/180
>>
>>
>> Regards,
>> Chamila de Alwis
>> Software Engineer | WSO2 | +94772207163
>> Blog: code.chamiladealwis.com
>>
>>
>>
>> On Tue, Jan 20, 2015 at 4:39 PM, Imesh Gunaratne <imesh@apache.org>
>> wrote:
>>
>>> May be we could support both ways of sending application path, might
>>> need to see how agent and accommodate it.
>>>
>>> Thanks
>>>
>>> On Tue, Jan 20, 2015 at 12:22 PM, Lakmal Warusawithana <lakmal@wso2.com>
>>> wrote:
>>>
>>>>
>>>>
>>>> On Tue, Jan 20, 2015 at 12:00 PM, Imesh Gunaratne <imesh@apache.org>
>>>> wrote:
>>>>
>>>>> The reason for this is that, in Kuberntes we still do not use an
>>>>> orchestration layer such as Puppet. As a result it is not possible to
>>>>> define this in Puppet master. Therefore we need to add application path
to
>>>>> cluster (basic) payload.
>>>>>
>>>>> IMO it would be better to stick to this standard for all scenarios.
>>>>> WDYT?
>>>>>
>>>>
>>>> I'm not sure we should push these standard, because it depends on the
>>>> technologies and scenarios. Yes, for kubernetes, we should specify this in
>>>> cartridge definition, but VM scenario, its depends on what orchestration
>>>> methods, pattens are used.
>>>>
>>>>
>>>>
>>>>>
>>>>> Thanks
>>>>>
>>>>> On Tue, Jan 20, 2015 at 1:36 AM, Chamila De Alwis <chamilad@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> This seems to be the result of APPLICATION_PATH in the payload having
>>>>>> a null value. Following is the launch parameters file which contains
the
>>>>>> payload data.
>>>>>>
>>>>>>
>>>>>> APPLICATION_ID=app_cartridge_v1,GROUP_NAME=null,SERVICE_NAME=tomcat,HOST_NAME=
>>>>>> mytomcat.isuruh.lk
>>>>>> ,MULTITENANT=false,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=mytomcat,CLUSTER_ID=mytomcat.tomcat.domain,CARTRIDGE_KEY=dyP8jPcoLSoCv5B7,DEPLOYMENT=default,
>>>>>> *APPLICATION_PATH=null*,REPO_URL=
>>>>>> https://github.com/chamilad/tc-hw-artifact-repo.git,PORTS=22,PROVIDER=apache,PUPPET_IP=192.168.30.96,PUPPET_HOSTNAME=puppet.chamilad.org,PUPPET_DNS_AVAILABLE=null,PUPPET_ENV=null,,,DEPENDENCY_CLUSTER_IDS=,TOKEN=eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjQwNTU0MzY1LCJzdWIiOiJhZG1pbiIsImF6cCI6IjFfVEREOWZVTXpVRHFBUEdGZ3haa21ZcGVjMGEiLCJhcHBJZCI6ImFwcF9jYXJ0cmlkZ2VfdjEiLCJhdWQiOlsiMV9UREQ5ZlVNelVEcUFQR0ZneFprbVlwZWMwYSJdLCJpc3MiOiJodHRwczpcL1wvbG9jYWxob3N0Ojk0NDNcL29hdXRoMmVuZHBvaW50c1wvdG9rZW4iLCJpYXQiOjM2OTU0MzY1fQ.ANgYt0H5AiTi9JRJi2N3-QxyUhS-3UOx1_kDaLdkv7k9LGkaWYJ1apceDn8Z0ZdSO0u7aPji2bRbg7FOaHGNVy9167gR5wmj503nmr5cXX0IdPSGX-ahwtf_dI9maIxkDbOjbU3s922bN60zdTdkb1n5kKoT_MgllcpO0iaTCJo,MEMBER_ID=mytomcat.tomcat.domain4dcf223c-63f9-4f9c-b69c-45a3355a0659,INSTANCE_ID=null,CLUSTER_INSTANCE_ID=app_cartridge_v1-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=openstack_R1,PARTITION_ID=P1,INTERNAL=false,PRIMARY=false,MIN_COUNT=2
>>>>>>
>>>>>>
>>>>>> The APPLICATION_PATH (previously APP_PATH) was set by the Puppet
>>>>>> module using the docroot variable set at the node definition for
each
>>>>>> cartridge type[1]. However as of
>>>>>> revision 0fdef65eac1ae8bdacae9cd69a2916db90f6950b [2], the APPLICATION_PATH
>>>>>> is added to the basic payload data.
>>>>>>
>>>>>> Is there a particular reason for this? If so, why does it set a null
>>>>>> value to the APPLICATION_PATH?
>>>>>>
>>>>>> IMO, since this is a configuration detail, this should be handled
by
>>>>>> the configuration layer, i.e. either Puppet or the variables in the
>>>>>> Dockerfile.
>>>>>>
>>>>>>
>>>>>> [1] -
>>>>>> https://github.com/apache/stratos/blob/master/tools/puppet3/manifests/nodes/tomcat.pp
>>>>>> [2] -
>>>>>> https://github.com/apache/stratos/commit/0fdef65eac1ae8bdacae9cd69a2916db90f6950b
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>> Chamila de Alwis
>>>>>> Software Engineer | WSO2 | +94772207163
>>>>>> Blog: code.chamiladealwis.com
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Jan 19, 2015 at 6:31 PM, Chamila De Alwis <chamilad@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm getting the following error in the agent log when creating
a
>>>>>>> tomcat cartridge based on the single-cartridge sample. It looks
like the
>>>>>>> folder to clone the artifacts is not being created. I'm looking
in to this
>>>>>>> now.
>>>>>>>
>>>>>>> 2015-01-19 18:13:01,919:DEBUG:Executing handler for event
>>>>>>> 'ArtifactUpdatedEvent'
>>>>>>> 2015-01-19 18:13:01,919:INFO:Artifact update event received:
>>>>>>> [tenant] u'-1234' [cluster] u'mytomcat.tomcat.domain' [status]
None
>>>>>>> 2015-01-19 18:13:01,919:INFO:Executing git checkout
>>>>>>> 2015-01-19 18:13:01,920:DEBUG:Executing git clone: [tenant-id]
-1234
>>>>>>> [repo-url] https://github.com/chamilad/tc-hw-artifact-repo.git
>>>>>>> 2015-01-19 18:13:01,920:DEBUG:Repo path returned : ''
>>>>>>> 2015-01-19 18:13:01,937:ERROR:Permission denied for repository
path
>>>>>>> for tenant u'-1234'
>>>>>>> Traceback (most recent call last):
>>>>>>>   File
>>>>>>> "/mnt/apache-stratos-python-cartridge-agent-4.1.0-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
>>>>>>> line 230, in clone
>>>>>>>     repo = Repo.clone_from(repo_context.repo_url,
>>>>>>> repo_context.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
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>> Chamila de Alwis
>>>>>>> Software Engineer | WSO2 | +94772207163
>>>>>>> Blog: code.chamiladealwis.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Imesh Gunaratne
>>>>>
>>>>> Technical Lead, WSO2
>>>>> Committer & PMC Member, Apache Stratos
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Lakmal Warusawithana
>>>> Vice President, Apache Stratos
>>>> Director - Cloud Architecture; WSO2 Inc.
>>>> Mobile : +94714289692
>>>> Blog : http://lakmalsview.blogspot.com/
>>>>
>>>>
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>

Mime
View raw message