ECS: "swift stat" shows bucket size and object count as 0 for ECS buckets


   Article Number:     533933                                   Article Version: 3     Article Type:    Break Fix 




ECS Appliance,Elastic Cloud Storage,ECS Software





It has been noticed that with current ECS Code level ( / 3.3 while this KB got created) a SWIFT client is not able to show the total count of objects in an ECS bucket as well as the used Bytes while it is working with legacy SWIFT container.   
    The below shown details are a test container used by customer with only containing one test file for this testing purpose, but the issue applies to all ECS buckets used.   
    Doing the same command for a legacy SWIFT container, it is working as expected.   
    The swift client is showing 0 objects while svc_bucket is able to show a count of 1 object:   

user@linuxpc:~$ swift --versionpython-swiftclient 3.0.0user@linuxpc:~$user@linuxpc:~$ swift list private-swiftsource.gifuser@linuxpc:~$ swift stat private-swiftAccount: ops-thomasContainer: private-swiftObjects: 0Bytes: 0Read ACL:Write ACL:Sync To:Sync Key:X-Emc-Retention-Period: 0X-Emc-Is-Tso-Read-Only: falseAccept-Ranges: bytesX-Timestamp: 1554368486418X-Trans-Id: tx0a0cc20c16a3b34617867-d4b900000000X-Emc-Request-Id: 0a0cc20c:16a3b346178:67d4:b9X-Emc-Is-Stale-Allowed: falseContent-Type: text/htmluser@linuxpc:~$    
admin@ecs-n-1:~> svc_bucket info private-swiftsvc_bucket v1.0.21 (svc_tools v1.5.1) Started 2019-04-25 13:20:52Bucket ID ops-thomas.private-swiftName private-swiftNamespace ops-thomasOwner User ops-thomasOwner VDC Name VDC1Owner zone/VDC ID urn:storageos:VirtualDataCenterData:7cc29918-6a4f-471a-b37d-0b80c4456b2dKeypool Hash ID 889908b01ab067629160046e6512f874a915fe950a3ec8024d4c38ee690329c7Bucket ACL:Type Affects Name Access Rightsuser file/dir ops-thomas FULL_CONTROLgroup file/dir admin FULL_CONTROLReplication Group (vpool) Name rg-vdcReplication Group (vpool) ID urn:storageos:ReplicationGroupInfo:f77c41f0-533c-435c-a349-088b3dc198ca:globalBucket Creation Date 2019-04-04 09:01:26 (1554368486418)Temp Failed (TSO) FalseAPI Type SWIFTFS Access Enabled FalseEncryption Enabled FalseVersioning State DisabledADO Enabled FalseADO Read-Only FalseDefault FS Access permissions (for owner group):File DirRead Write Exec Read Write ExecUnk Unk Unk Unk Unk UnkObject count 1Total Object Size 0.0072 GBadmin@ecs-n-1:~>    






ECS code is not acting as expected and development has been asked to improve the code for future release of ECS                                                           






As a workaround REST API could be used to gather the bucket information:






If you encounter this issue, please open a Service Request with support and refer to KB 533933 for asking if the ECS code has been improved in the meantime.