The permission value of files compressed as a VNF package incorrectly changes to "644".

Bug #1923540 reported by Shanu Pandit
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Medium
Shanu Pandit

Bug Description

Permission of Files which are compressed for "vnf package upload", changes to "644".

<Operation log>

stack@instance-repo-20210209:~/tacker/temporary$ openstack vnf package create
+-------------------+-------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------------------------------------------------------------+
| ID | a3d0b581-81ae-421b-9548-95bc7f22ff7f |
| Links | { |
| | "self": { |
| | "href": "/vnfpkgm/v1/vnf_packages/a3d0b581-81ae-421b-9548-95bc7f22ff7f" |
| | }, |
| | "packageContent": { |
| | "href": "/vnfpkgm/v1/vnf_packages/a3d0b581-81ae-421b-9548-95bc7f22ff7f/package_content" |
| | } |
| | } |
| Onboarding State | CREATED |
| Operational State | DISABLED |
| Usage State | NOT_IN_USE |
| User Defined Data | {} |
+-------------------+-------------------------------------------------------------------------------------------------+
stack@instance-repo-20210209:

* Below are the Files which are going to be uploaded.
* NOTE: Permission of files are not 644

stack@instance-repo-20210209:~/tacker/temporary/vnfpackage$ ls -lrt *
Scripts:
total 4
-rwxr-xr-x 1 stack stack 33 Mar 27 11:32 install.sh

Files:
total 8
drwxr-xr-x 2 stack stack 4096 Mar 27 11:32 images
drwxr-xr-x 2 stack stack 4096 Mar 27 11:32 kubernetes

TOSCA-Metadata:
total 4
-rwxr-xr-x 1 stack stack 219 Mar 27 11:32 TOSCA.meta

Definitions:
total 96
-rwxr-xr-x 1 stack stack 67211 Mar 27 11:32 etsi_nfv_sol001_vnfd_types.yaml
-rwxr-xr-x 1 stack stack 9125 Mar 27 11:32 etsi_nfv_sol001_common_types.yaml
-rwxr-xr-x 1 stack stack 5571 Mar 27 11:32 helloworld3_df_simple.yaml
-rwxr-xr-x 1 stack stack 889 Apr 11 04:21 helloworld3_top.vnfd.yaml
-rwxr-xr-x 1 stack stack 1537 Apr 11 04:22 helloworld3_types.yaml
stack@instance-repo-20210209:~/tacker/temporary/vnfpackage$

stack@instance-repo-20210209:~/tacker/temporary/vnfpackage$ zip -r ../vnfpackage.zip *
  adding: Definitions/ (stored 0%)
  adding: Definitions/helloworld3_df_simple.yaml (deflated 75%)
  adding: Definitions/etsi_nfv_sol001_common_types.yaml (deflated 76%)
  adding: Definitions/helloworld3_types.yaml (deflated 70%)
  adding: Definitions/etsi_nfv_sol001_vnfd_types.yaml (deflated 84%)
  adding: Definitions/helloworld3_top.vnfd.yaml (deflated 54%)
  adding: Files/ (stored 0%)
  adding: Files/kubernetes/ (stored 0%)
  adding: Files/kubernetes/deployment.yaml (deflated 62%)
  adding: Files/images/ (stored 0%)
  adding: Files/images/cirros-0.4.0-x86_64-disk.img (deflated 4%)
  adding: Scripts/ (stored 0%)
  adding: Scripts/install.sh (stored 0%)
  adding: TOSCA-Metadata/ (stored 0%)
  adding: TOSCA-Metadata/TOSCA.meta (deflated 21%)
stack@instance-repo-20210209:~/tacker/temporary/vnfpackage$

stack@instance-repo-20210209:~/tacker/temporary$ openstack vnf package upload --path vnfpackage.zip a3d0b581-81ae-421b-9548-95bc7f22ff7f
Upload request for VNF package a3d0b581-81ae-421b-9548-95bc7f22ff7f has been accepted.

spandit@instance-repo-20210209:/opt/stack/tacker$ ls -lrt /opt/stack/data/tacker/vnfpackage/a3d0b581-81ae-421b-9548-95bc7f22ff7f/*
/opt/stack/data/tacker/vnfpackage/a3d0b581-81ae-421b-9548-95bc7f22ff7f/Files:
total 8
drwxr-xr-x 2 stack stack 4096 Apr 11 04:26 kubernetes
drwxr-xr-x 2 stack stack 4096 Apr 11 04:26 images

/opt/stack/data/tacker/vnfpackage/a3d0b581-81ae-421b-9548-95bc7f22ff7f/Definitions:
total 96
-rw-r--r-- 1 stack stack 1537 Apr 11 04:26 helloworld3_types.yaml
-rw-r--r-- 1 stack stack 889 Apr 11 04:26 helloworld3_top.vnfd.yaml
-rw-r--r-- 1 stack stack 5571 Apr 11 04:26 helloworld3_df_simple.yaml
-rw-r--r-- 1 stack stack 67211 Apr 11 04:26 etsi_nfv_sol001_vnfd_types.yaml
-rw-r--r-- 1 stack stack 9125 Apr 11 04:26 etsi_nfv_sol001_common_types.yaml

/opt/stack/data/tacker/vnfpackage/a3d0b581-81ae-421b-9548-95bc7f22ff7f/TOSCA-Metadata:
total 4
-rw-r--r-- 1 stack stack 219 Apr 11 04:26 TOSCA.meta

/opt/stack/data/tacker/vnfpackage/a3d0b581-81ae-421b-9548-95bc7f22ff7f/Scripts:
total 4
-rw-r--r-- 1 stack stack 33 Apr 11 04:26 install.sh
spandit@instance-repo-20210209:

Changed in tacker:
assignee: nobody → Shanu Pandit (spandit1511)
Changed in tacker:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/787066

Changed in tacker:
assignee: Shanu Pandit (spandit1511) → Sheel Rana (ranasheel2000)
Changed in tacker:
assignee: Sheel Rana (ranasheel2000) → Shanu Pandit (spandit1511)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/787066
Committed: https://opendev.org/openstack/tacker/commit/89b3b65c7c28da3762f742518ac9946acab818da
Submitter: "Zuul (22348)"
Branch: master

commit 89b3b65c7c28da3762f742518ac9946acab818da
Author: Sheel Rana <email address hidden>
Date: Wed May 12 04:44:49 2021 +0900

    Retaining permission of VNF package files

    Python zipfile module changes permission of the zip file
    contents to 644 incorrectly while extracting zip file.

    This is because of the bug present in the python zipfile module:
    https://bugs.python.org/issue15795

    This patch will resolve this issue and retain the permission of
    files.

    Co-Authored-By: Shanu Pandit <email address hidden>
    Co-Authored-By: Sheel Rana <email address hidden>

    Closes-Bug: #1923540
    Change-Id: I71aad5f879e6df21f679187283957c59b73e0643

Changed in tacker:
status: In Progress → Fix Released
Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 6.0.0.0rc1

This issue was fixed in the openstack/tacker 6.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.