kubernetes: mongodb not starting wiredtiger storage engine when used with azurefile storage class

What happened: I am trying to run mongodb(v 4.0.4) docker image in openshift. There is Azure file storage class used for persistence. When the pod is started the persistent volume claim is attached to the pod. But when the mongod tries to run i get the following error related to wiredTiger storage engine.

2019-01-28T17:54:23.006+0000 I CONTROL [initandlisten] options: { net: { bindIpAll: true }, security: { authorization: “enabled” } }

| 2019-01-28T17:54:23.046+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=63951M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),   | 2019-01-28T17:54:23.925+0000 E STORAGE [initandlisten] WiredTiger error (17) [1548698063:925803][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1548698063:925803][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: File exists   | 2019-01-28T17:54:48.978+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.2769   | 2019-01-28T17:54:49.002+0000 E STORAGE [initandlisten] WiredTiger error (1) [1548698089:2451][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1548698089:2451][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted   | 2019-01-28T17:54:49.075+0000 E STORAGE [initandlisten] WiredTiger error (17) [1548698089:75321][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1548698089:75321][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: File exists   | 2019-01-28T17:55:13.653+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.2770   | 2019-01-28T17:55:13.662+0000 E STORAGE [initandlisten] WiredTiger error (1) [1548698113:662017][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1548698113:662017][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted   | 2019-01-28T17:55:13.724+0000 E STORAGE [initandlisten] WiredTiger error (17) [1548698113:724617][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1548698113:724617][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: File exists   | 2019-01-28T17:55:38.758+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.2771   | 2019-01-28T17:55:38.767+0000 E STORAGE [initandlisten] WiredTiger error (1) [1548698138:767427][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1548698138:767427][1:0x7fd9cab54a40], connection: __posix_open_file, 715: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted   | 2019-01-28T17:55:38.771+0000 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.   | 2019-01-28T17:55:38.772+0000 F STORAGE [initandlisten] Reason: 1: Operation not permitted   | 2019-01-28T17:55:38.772+0000 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 646   | 2019-01-28T17:55:38.772+0000 F - [initandlisten]   | ***aborting after fassert() failure

What you expected to happen: I want the mongod to start without any errors.

How to reproduce it (as minimally and precisely as possible): Use Kubernetes v1.9.1+a0ce1bc657 and use Azuerfile storage class for persistent volume.

Anything else we need to know: I am running this in openshift environment which uses kubernetes.

Environment:

  • Openshift - v3.9.60
  • Kubernetes version (use kubectl version): v1.9.1+a0ce1bc657
  • Storage class - Azure file
  • Mongodb - 4.0.4 (using docker image)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 15 (3 by maintainers)

Most upvoted comments

I guess there will be issue if you try to use azure file , nfs and glusterfs as these are read write many type storage classes. If you use any type of read write once storage class like azure disk then the issue can be solved. For our project we are moving away from containerized Mongo to external Mongo cluster.

This seems to occur on Azure file where Mongo has previously told the file share to delete a file and the azure file did not acknowledge the request or otherwise failed to close the file. You can see that there are files open with$storageContext = New-AzStorageContext -StorageAccountName "storage_account_name" -StorageAccountKey "storage_account_key" and Get-AzStorageFileHandle -Context $storageContext -ShareName "file_share_name" -Recursive. If you physically close the open files with Close-AzStorageFileHandle -Context $storageContext -ShareName "file_share_name" -Path 'journal/WiredTigerLog.0000000002' -CloseAll (replace journal/* with your file name). I’m starting to wonder if Azure file share (standard is what I’m using) is up to to the task of hosing mongo. Maybe I’ll try premium.