sodafoundation / api

SODA Terra Project API module : is an open source implementation of SODA API connecting storage to platforms like Kubernetes, OpenStack, and VMware
Apache License 2.0
828 stars 314 forks source link

Correcting the built binary path #1290

Closed kumarashit closed 4 years ago

kumarashit commented 4 years ago

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:

/kind new feature kind bug fix /kind cleanup /kind revert change /kind design /kind documentation /kind enhancement

What this PR does / why we need it: As the devsds installation fails because of the incorrect path, Fixing the path using the OPENSDS_DIR variable. Minor text correction Which issue(s) this PR fixes:

Fixes #1288 https://github.com/sodafoundation/api/issues/1288 Path fix Test Report Added?:

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line: kind TESTED /kind NOT-TESTED

Test Report: Here is the installed log:

2020-06-12 19:53:28.516 | + export OPENSDS_ENDPOINT=http://localhost:50040
2020-06-12 19:53:28.516 | + OPENSDS_ENDPOINT=http://localhost:50040
2020-06-12 19:53:28.516 | + /root/gopath/src/github.com/sodafoundation/api/build/out/bin/osdsctl profile create '{"name": "default_block", "description": "default policy", "storageType": "block"}'
2020-06-12 19:53:28.907 | +--------------------------+--------------------------------------+
2020-06-12 19:53:28.907 | | Property                 | Value                                |
2020-06-12 19:53:28.907 | +--------------------------+--------------------------------------+
2020-06-12 19:53:28.907 | | Id                       | c17e2505-2ba3-45fe-87fa-d478cd98f55a |
2020-06-12 19:53:28.907 | | CreatedAt                | 2020-06-13T01:23:28                  |
2020-06-12 19:53:28.907 | | Name                     | default_block                        |
2020-06-12 19:53:28.907 | | Description              | default policy                       |
2020-06-12 19:53:28.907 | | StorageType              | block                                |
2020-06-12 19:53:28.907 | | ProvisioningProperties   | {                                    |
2020-06-12 19:53:28.907 | |                          |   "dataStorage": {                   |
2020-06-12 19:53:28.907 | |                          |     "compression": false,            |
2020-06-12 19:53:28.907 | |                          |     "deduplication": false           |
2020-06-12 19:53:28.907 | |                          |   },                                 |
2020-06-12 19:53:28.907 | |                          |   "ioConnectivity": {}               |
2020-06-12 19:53:28.907 | |                          | }                                    |
2020-06-12 19:53:28.907 | |                          |                                      |
2020-06-12 19:53:28.907 | | ReplicationProperties    | {                                    |
2020-06-12 19:53:28.907 | |                          |   "dataProtection": {                |
2020-06-12 19:53:28.907 | |                          |     "isIsolated": false              |
2020-06-12 19:53:28.907 | |                          |   },                                 |
2020-06-12 19:53:28.907 | |                          |   "replicaInfos": {}                 |
2020-06-12 19:53:28.907 | |                          | }                                    |
2020-06-12 19:53:28.907 | |                          |                                      |
2020-06-12 19:53:28.907 | | SnapshotProperties       | {                                    |
2020-06-12 19:53:28.907 | |                          |   "schedule": {},                    |
2020-06-12 19:53:28.907 | |                          |   "retention": {},                   |
2020-06-12 19:53:28.907 | |                          |   "topology": {}                     |
2020-06-12 19:53:28.907 | |                          | }                                    |
2020-06-12 19:53:28.907 | |                          |                                      |
2020-06-12 19:53:28.907 | | DataProtectionProperties | {                                    |
2020-06-12 19:53:28.908 | |                          |   "dataProtection": {                |
2020-06-12 19:53:28.908 | |                          |     "isIsolated": false              |
2020-06-12 19:53:28.908 | |                          |   }                                  |
2020-06-12 19:53:28.908 | |                          | }                                    |
2020-06-12 19:53:28.908 | |                          |                                      |
2020-06-12 19:53:28.908 | | CustomProperties         | null                                 |
2020-06-12 19:53:28.908 | |                          |                                      |
2020-06-12 19:53:28.908 | +--------------------------+--------------------------------------+
2020-06-12 19:53:28.908 | + /root/gopath/src/github.com/sodafoundation/api/build/out/bin/osdsctl profile create '{"name": "default_file", "description": "default policy", "storageType": "file", "provisioningProperties":{"ioConnectivity": {"accessProtocol": "NFS"},"DataStorage":{"StorageAccessCapability":["Read","Write","Execute"]}}}'
2020-06-12 19:53:28.999 | +--------------------------+--------------------------------------+
2020-06-12 19:53:28.999 | | Property                 | Value                                |
2020-06-12 19:53:28.999 | +--------------------------+--------------------------------------+
2020-06-12 19:53:28.999 | | Id                       | 5f64eaf7-b4f8-4e8f-93d8-dd21a9c76469 |
2020-06-12 19:53:28.999 | | CreatedAt                | 2020-06-13T01:23:28                  |
2020-06-12 19:53:28.999 | | Name                     | default_file                         |
2020-06-12 19:53:28.999 | | Description              | default policy                       |
2020-06-12 19:53:28.999 | | StorageType              | file                                 |
2020-06-12 19:53:28.999 | | ProvisioningProperties   | {                                    |
2020-06-12 19:53:28.999 | |                          |   "dataStorage": {                   |
2020-06-12 19:53:28.999 | |                          |     "storageAccessCapability": [     |
2020-06-12 19:53:28.999 | |                          |       "Read",                        |
2020-06-12 19:53:28.999 | |                          |       "Write",                       |
2020-06-12 19:53:28.999 | |                          |       "Execute"                      |
2020-06-12 19:53:28.999 | |                          |     ],                               |
2020-06-12 19:53:28.999 | |                          |     "compression": false,            |
2020-06-12 19:53:28.999 | |                          |     "deduplication": false           |
2020-06-12 19:53:28.999 | |                          |   },                                 |
2020-06-12 19:53:29.000 | |                          |   "ioConnectivity": {                |
2020-06-12 19:53:29.000 | |                          |     "accessProtocol": "NFS"          |
2020-06-12 19:53:29.000 | |                          |   }                                  |
2020-06-12 19:53:29.000 | |                          | }                                    |
2020-06-12 19:53:29.000 | |                          |                                      |
2020-06-12 19:53:29.000 | | ReplicationProperties    | {                                    |
2020-06-12 19:53:29.000 | |                          |   "dataProtection": {                |
2020-06-12 19:53:29.000 | |                          |     "isIsolated": false              |
2020-06-12 19:53:29.000 | |                          |   },                                 |
2020-06-12 19:53:29.000 | |                          |   "replicaInfos": {}                 |
2020-06-12 19:53:29.000 | |                          | }                                    |
2020-06-12 19:53:29.000 | |                          |                                      |
2020-06-12 19:53:29.000 | | SnapshotProperties       | {                                    |
2020-06-12 19:53:29.000 | |                          |   "schedule": {},                    |
2020-06-12 19:53:29.000 | |                          |   "retention": {},                   |
2020-06-12 19:53:29.000 | |                          |   "topology": {}                     |
2020-06-12 19:53:29.000 | |                          | }                                    |
2020-06-12 19:53:29.000 | |                          |                                      |
2020-06-12 19:53:29.000 | | DataProtectionProperties | {                                    |
2020-06-12 19:53:29.000 | |                          |   "dataProtection": {                |
2020-06-12 19:53:29.000 | |                          |     "isIsolated": false              |
2020-06-12 19:53:29.000 | |                          |   }                                  |
2020-06-12 19:53:29.000 | |                          | }                                    |
2020-06-12 19:53:29.000 | |                          |                                      |
2020-06-12 19:53:29.000 | | CustomProperties         | null                                 |
2020-06-12 19:53:29.000 | |                          |                                      |
2020-06-12 19:53:29.000 | +--------------------------+--------------------------------------+
2020-06-12 19:53:29.001 | + '[' 0 == 0 ']'
2020-06-12 19:53:29.001 | + osds::echo_summary devsds installed successfully '!!'
2020-06-12 19:53:29.001 | + echo -e devsds installed successfully '!!'

Execute commands below to set up ENVs which are needed by SODA CLI:
------------------------------------------------------------------
export OPENSDS_AUTH_STRATEGY=keystone
export OPENSDS_ENDPOINT=http://localhost:50040
export OS_AUTH_URL=http://192.168.20.163/identity
export OS_USERNAME=admin
export OS_PASSWORD=opensds@123
export OS_TENANT_NAME=admin
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_ID=default
------------------------------------------------------------------
Enjoy it !!

root@aks:~/gopath/src/github.com/sodafoundation/api# 
root@aks:~/gopath/src/github.com/sodafoundation/api# osdsctl volume create -n ash_01 1
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| Id               | 78341d1a-88a1-4442-bb78-1d825947f385 |
| CreatedAt        | 2020-06-13T01:29:10                  |
| Name             | ash_01                               |
| Description      |                                      |
| GroupId          |                                      |
| Size             | 1                                    |
| AvailabilityZone | default                              |
| Status           | creating                             |
| PoolId           |                                      |
| ProfileId        | c17e2505-2ba3-45fe-87fa-d478cd98f55a |
| Metadata         | null                                 |
|                  |                                      |
| MultiAttach      | false                                |
+------------------+--------------------------------------+
root@aks:~/gopath/src/github.com/sodafoundation/api# osdsctl volume list
+--------------------------------------+--------+-------------+------+------------------+-----------+--------------------------------------+
| Id                                   | Name   | Description | Size | AvailabilityZone | Status    | ProfileId                            |
+--------------------------------------+--------+-------------+------+------------------+-----------+--------------------------------------+
| 78341d1a-88a1-4442-bb78-1d825947f385 | ash_01 |             | 1    | default          | available | c17e2505-2ba3-45fe-87fa-d478cd98f55a |
+--------------------------------------+--------+-------------+------+------------------+-----------+--------------------------------------+
root@aks:~/gopath/src/github.com/sodafoundation/api#

Special notes for your reviewer:

codecov-commenter commented 4 years ago

Codecov Report

Merging #1290 into development will not change coverage. The diff coverage is n/a.

@@             Coverage Diff              @@
##           development    #1290   +/-   ##
============================================
  Coverage        40.86%   40.86%           
============================================
  Files               53       53           
  Lines             7752     7752           
============================================
  Hits              3168     3168           
  Misses            4083     4083           
  Partials           501      501           
joseph-v commented 4 years ago

LGTM

PravinRanjan10 commented 4 years ago

LGTM