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
827 stars 316 forks source link

Creating file share throwing already exists, but no entry in db for that file share #1018

Closed Shruthi-1MN closed 4 years ago

Shruthi-1MN commented 5 years ago

Is this a BUG REPORT or FEATURE REQUEST?: Create file share but osdsdock report already exists

root@shruthi-VirtualBox:~/go/src/github.com/opensds/opensds# cat /var/log/opensds/osdsdock.ERROR 
Log file created at: 2019/10/03 12:48:07
Running on machine: shruthi-VirtualBox
Binary: Built with gc go1.12.1 for linux/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E1003 12:48:07.254310    2617 exec.go:41] Execute command failed
info:
mkdir: cannot create directory '/mnt/jk2': File exists

error: exit status 1
E1003 12:48:07.254940    2617 nfs.go:164] failed to create a directory:exit status 1
E1003 12:48:07.254948    2617 dock.go:537] when create file share in dock module:exit status 1

But mount path doesn't exists on the operating system

root@shruthi-VirtualBox:~/go/src/github.com/opensds/opensds# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            4.9G     0  4.9G   0% /dev
tmpfs           991M  9.2M  982M   1% /run
/dev/sda1        78G  9.2G   65G  13% /
tmpfs           4.9G  252K  4.9G   1% /dev/shm
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           4.9G     0  4.9G   0% /sys/fs/cgroup
tmpfs           991M  4.0K  991M   1% /run/user/108
tmpfs           991M   56K  991M   1% /run/user/1000
/dev/sr0         82M   82M     0 100% /media/shruthi/VBox_GAs_6.0.4

Opensds db has entry of error status entry

root@shruthi-VirtualBox:~/go/src/github.com/opensds/opensds# osdsctl fileshare list 
WARNING: OPENSDS_ENDPOINT is not specified, use default(http://localhost:50040)
WARNING: Not found Env OPENSDS_AUTH_STRATEGY, use default(noauth)
+--------------------------------------+------+-----------+-------------+------+--------+--------------------------------------+-----------------+
| Id                                   | Name | Protocols | Description | Size | Status | ProfileId                            | ExportLocations |
+--------------------------------------+------+-----------+-------------+------+--------+--------------------------------------+-----------------+
| 5d1c3d75-9f65-44f9-9b52-7c1fceb8c07a | jk2  | []        |             | 1    | error  | 635b98f9-e178-4041-a46e-aab3fcbef0c2 | []              |
+--------------------------------------+------+-----------+-------------+------+--------+--------------------------------------+-----------------+
root@shruthi-VirtualBox:~/go/src/github.com/opensds/opensds# 

Uncomment only one, leave it on its own line:

/kind bug /kind feature

What happened:

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

Shruthi-1MN commented 4 years ago

Duplicate of #1057, so closing this issue.