Project

Profile

Help

Issue #721 » export ISO to test directory-permission denied.txt

bvijaycom, 02/27/2015 07:55 PM

 
1

    
2

    
3
[root@XXXXXX053 ~]# pulp-admin rpm repo export run --repo-id custom_repo1 --export-dir /test/
4
+----------------------------------------------------------------------+
5
                  Publishing Repository [custom_repo1]
6
+----------------------------------------------------------------------+
7

    
8
The following publish configuration options will be used:
9

    
10
Export Dir:  /test/
11

    
12

    
13
This command may be exited via ctrl+c without affecting the request.
14

    
15

    
16
Initializing repo metadata
17
[-]
18
... completed
19

    
20
Publishing Distribution files
21
[-]
22
... completed
23

    
24
Publishing RPMs
25
[-]
26
... completed
27

    
28
Publishing Delta RPMs
29
... skipped
30

    
31
Publishing Errata
32
[-]
33
... completed
34

    
35
Publishing Comps file
36
[-]
37
... completed
38

    
39
Publishing Metadata.
40
[-]
41
... completed
42

    
43
Closing repo metadata
44
[-]
45
... completed
46

    
47
Generating sqlite files
48
... skipped
49

    
50
Copying files
51
[-]
52
... failed
53
[Errno 13] Permission denied: '/test/custom_repo1'
54

    
55

    
56
Task Failed
57

    
58
[Errno 13] Permission denied: '/test/custom_repo1'
59

    
60

    
61

    
62
**************************************************************************************************
63

    
64
Here i have attached the server_calls.log
65

    
66
i have even changed the ownership for /test directory like below
67

    
68
drwxrwxrwx.   2 apache apache    6 Feb 27 10:52 test
69

    
70

    
71
But still i am getting the permission denied error in server_calls log too.
72

    
73

    
74

    
75
2015-02-27 11:23:56,968 - INFO - POST request to /pulp/api/v2/tasks/search/ with parameters {"criteria": {"filters": {"state": {"$nin": ["finished", "error", "canceled", "skipped"]}, "tags": {"$all": ["pulp:repository:custom_repo1", "pulp:action:publish"]}}}}
76
2015-02-27 11:23:56,968 - INFO - Response status : 200
77

    
78
2015-02-27 11:23:56,969 - INFO - Response body :
79
 []
80

    
81
2015-02-27 11:23:57,525 - INFO - POST request to /pulp/api/v2/repositories/custom_repo1/actions//publish/ with parameters {"override_config": {"export_dir": "/test/"}, "id": "export_distributor"}
82
2015-02-27 11:23:57,525 - INFO - Response status : 202
83

    
84
2015-02-27 11:23:57,525 - INFO - Response body :
85
 {
86
  "spawned_tasks": [
87
    {
88
      "_href": "/pulp/api/v2/tasks/d970010f-4ebd-429a-82da-e84eeb324ed9/",
89
      "task_id": "d970010f-4ebd-429a-82da-e84eeb324ed9"
90
    }
91
  ],
92
  "result": null,
93
  "error": null
94
}
95

    
96
2015-02-27 11:23:58,575 - INFO - GET request to /pulp/api/v2/tasks/d970010f-4ebd-429a-82da-e84eeb324ed9/ with parameters None
97
2015-02-27 11:23:58,575 - INFO - Response status : 200
98

    
99
2015-02-27 11:23:58,575 - INFO - Response body :
100
 {
101
  "exception": null,
102
  "task_type": "pulp.server.managers.repo.publish.publish",
103
  "_href": "/pulp/api/v2/tasks/d970010f-4ebd-429a-82da-e84eeb324ed9/",
104
  "task_id": "d970010f-4ebd-429a-82da-e84eeb324ed9",
105
  "tags": [
106
    "pulp:repository:custom_repo1",
107
    "pulp:action:publish"
108
  ],
109
  "finish_time": "2015-02-27T16:23:57Z",
110
  "_ns": "task_status",
111
  "start_time": "2015-02-27T16:23:57Z",
112
  "traceback": "Traceback (most recent call last):\n  File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 240, in trace_task\n    R = retval = fun(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 316, in __call__\n    return super(Task, self).__call__(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/celery/app/trace.py\", line 437, in __protected_call__\n    return self.run(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/managers/repo/publish.py\", line 98, in publish\n    transfer_repo, conduit, call_config)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/managers/repo/publish.py\", line 126, in _do_publish\n    publish_report = publish_repo(transfer_repo, conduit, call_config)\n  File \"/usr/lib/python2.7/site-packages/pulp/server/async/tasks.py\", line 471, in wrap_f\n    return f(*args, **kwargs)\n  File \"/usr/lib/python2.7/site-packages/pulp_rpm/plugins/distributors/export_distributor/distributor.py\", line 136, in publish_repo\n    return self._publisher.publish()\n  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 507, in publish\n    return self.process_lifecycle()\n  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 456, in process_lifecycle\n    super(PluginStep, self).process_lifecycle()\n  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 121, in process_lifecycle\n    step.process()\n  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 179, in process\n    self._process_block()\n  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 214, in _process_block\n    self.process_main()\n  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 847, in process_main\n    shutil.copytree(self.source_dir, self.target_dir, symlinks=self.preserve_symlinks)\n  File \"/usr/lib64/python2.7/shutil.py\", line 177, in copytree\n    os.makedirs(dst)\n  File \"/usr/lib64/python2.7/os.py\", line 157, in makedirs\n    mkdir(name, mode)\nOSError: [Errno 13] Permission denied: '/test/custom_repo1'\n",
113
  "spawned_tasks": [],
114
  "progress_report": {
115
    "export_distributor": [
116
      {
117
        "num_success": 1,
118
        "description": "Initializing repo metadata",
119
        "step_type": "initialize_repo_metadata",
120
        "items_total": 1,
121
        "state": "FINISHED",
122
        "error_details": [],
123
        "num_failures": 0,
124
        "step_id": "3951881a-8f2b-4ea2-8eb6-6866125344ad",
125
        "num_processed": 1
126
      },
127
      {
128
        "num_success": 0,
129
        "description": "Publishing Distribution files",
130
        "step_type": "distribution",
131
        "items_total": 0,
132
        "state": "FINISHED",
133
        "error_details": [],
134
        "num_failures": 0,
135
        "step_id": "43c2661a-e0b7-4b1b-aa94-17a5fa37bbd1",
136
        "num_processed": 0
137
      },
138
      {
139
        "num_success": 1,
140
        "description": "Publishing RPMs",
141
        "step_type": "rpms",
142
        "items_total": 1,
143
        "state": "FINISHED",
144
        "error_details": [],
145
        "num_failures": 0,
146
        "step_id": "2996e11f-508b-4e81-a222-8c802c1b9709",
147
        "num_processed": 1
148
      },
149
      {
150
        "num_success": 0,
151
        "description": "Publishing Delta RPMs",
152
        "step_type": "drpms",
153
        "items_total": 1,
154
        "state": "SKIPPED",
155
        "error_details": [],
156
        "num_failures": 0,
157
        "step_id": "159c545f-99eb-4ed2-b555-6fa8512c3afd",
158
        "num_processed": 0
159
      },
160
      {
161
        "num_success": 0,
162
        "description": "Publishing Errata",
163
        "step_type": "errata",
164
        "items_total": 0,
165
        "state": "FINISHED",
166
        "error_details": [],
167
        "num_failures": 0,
168
        "step_id": "491b3f0c-78dd-4fa4-948a-9c1511b3aa12",
169
        "num_processed": 0
170
      },
171
      {
172
        "num_success": 0,
173
        "description": "Publishing Comps file",
174
        "step_type": "comps",
175
        "items_total": 0,
176
        "state": "FINISHED",
177
        "error_details": [],
178
        "num_failures": 0,
179
        "step_id": "0f8cd530-11f4-4358-8fec-354dcb6212af",
180
        "num_processed": 0
181
      },
182
      {
183
        "num_success": 0,
184
        "description": "Publishing Metadata.",
185
        "step_type": "metadata",
186
        "items_total": 0,
187
        "state": "FINISHED",
188
        "error_details": [],
189
        "num_failures": 0,
190
        "step_id": "dc087103-6888-4c16-bad0-dc9da0cc6692",
191
        "num_processed": 0
192
      },
193
      {
194
        "num_success": 1,
195
        "description": "Closing repo metadata",
196
        "step_type": "close_repo_metadata",
197
        "items_total": 1,
198
        "state": "FINISHED",
199
        "error_details": [],
200
        "num_failures": 0,
201
        "step_id": "18c20ccc-2eab-4970-878c-46a04903b270",
202
        "num_processed": 1
203
      },
204
      {
205
        "num_success": 0,
206
        "description": "Generating sqlite files",
207
        "step_type": "generate sqlite",
208
        "items_total": 1,
209
        "state": "SKIPPED",
210
        "error_details": [],
211
        "num_failures": 0,
212
        "step_id": "e3479d17-7969-4184-a345-b067467e517f",
213
        "num_processed": 0
214
      },
215
      {
216
        "num_success": 0,
217
        "description": "Copying files",
218
        "step_type": "save_tar",
219
        "items_total": 1,
220
        "state": "FAILED",
221
        "error_details": [
222
          {
223
            "traceback": "  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 179, in process\n    self._process_block()\n\n  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 214, in _process_block\n    self.process_main()\n\n  File \"/usr/lib/python2.7/site-packages/pulp/plugins/util/publish_step.py\", line 847, in process_main\n    shutil.copytree(self.source_dir, self.target_dir, symlinks=self.preserve_symlinks)\n\n  File \"/usr/lib64/python2.7/shutil.py\", line 177, in copytree\n    os.makedirs(dst)\n\n  File \"/usr/lib64/python2.7/os.py\", line 157, in makedirs\n    mkdir(name, mode)\n",
224
            "error": "[Errno 13] Permission denied: '/test/custom_repo1'"
225
          }
226
        ],
227
        "num_failures": 1,
228
        "step_id": "1ca263e7-5c3d-4b6a-b310-e96022f0f1a4",
229
        "num_processed": 1
230
      },
231
      {
232
        "num_success": 0,
233
        "description": "Writing Listings File",
234
        "step_type": "initialize_repo_metadata",
235
        "items_total": 1,
236
        "state": "NOT_STARTED",
237
        "error_details": [],
238
        "num_failures": 0,
239
        "step_id": "8f210f1b-4779-4bd7-9b97-80ad1188abf0",
240
        "num_processed": 0
241
      }
242
    ]
243
  },
244
  "queue": "reserved_resource_worker-1@XXXXXX053.test.com.dq",
245
  "state": "error",
246
  "result": null,
247
  "error": {
248
    "code": "PLP0000",
249
    "data": {},
250
    "description": "[Errno 13] Permission denied: '/test/custom_repo1'",
251
    "sub_errors": []
252

    
253

    
254
  },
255
  "_id": {
256
    "$oid": "54f09a1dd107b7684fe11c6c"
257
  },
258
  "id": "54f09a1d58fd0f07ff6a3ec8"
259
}
260

    
261
*******************************************************************************************
262

    
263

    
264

    
265

    
266
However now i have created the directory called export inside /var/lib/pulp/ and changed the ownership to apache:apache.Now if i run export command pointing to this directory,only rpm's are getting downloaded instead of single ISO file.
267

    
268
[root@XXXXXX053 pulp]# pulp-admin rpm repo export run --repo-id custom_repo1 --export-dir /var/lib/pulp/export/
269
+----------------------------------------------------------------------+
270
                  Publishing Repository [custom_repo1]
271
+----------------------------------------------------------------------+
272

    
273
The following publish configuration options will be used:
274

    
275
Export Dir:  /var/lib/pulp/export/
276

    
277

    
278
This command may be exited via ctrl+c without affecting the request.
279

    
280

    
281
Initializing repo metadata
282
[-]
283
... completed
284

    
285
Publishing Distribution files
286
[-]
287
... completed
288

    
289
Publishing RPMs
290
[-]
291
... completed
292

    
293
Publishing Delta RPMs
294
... skipped
295

    
296
Publishing Errata
297
[-]
298
... completed
299

    
300
Publishing Comps file
301
[-]
302
... completed
303

    
304
Publishing Metadata.
305
[-]
306
... completed
307

    
308
Closing repo metadata
309
[-]
310
... completed
311

    
312
Generating sqlite files
313
... skipped
314

    
315
Copying files
316
[-]
317
... completed
318

    
319
Writing Listings File
320
[-]
321
... completed
322

    
323

    
324
Task Succeeded
325

    
326

    
327
*****************************************************************************************
328

    
329

    
330
Another point i noticed is if we give different path for export,then rpms are getting downloaded instead of single ISO file.
331

    
332
[root@XXXXXX053 custom_repo1]# pwd
333
/var/lib/pulp/export/custom_repo1
334
[root@XXXXXX053 custom_repo1]# ls -ltr
335
total 1100
336
-rw-r--r--. 1 apache apache 1122292 Feb 25 16:41 engrampa-1.8.1-1.el7.x86_64.rpm
337
drwxr-x---. 2 apache apache    4096 Feb 27 11:36 repodata
338
[root@XXXXXX053 custom_repo1]#
339

    
340

    
341

    
342

    
(1-1/2)