Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The new Volume does not appear in the Volume collection after correctly creation #393

Open
ArturBaryla opened this issue Feb 12, 2021 · 3 comments
Labels
prio:normal normal priority, can be taken up after high priority issues are addressed status:confirmed Issue is accepted and implementation will be taken up at the earliest subject to priorities type:bug This tag is attached to 'bug' issue during creation

Comments

@ArturBaryla
Copy link
Collaborator

The new Volume does not appear in the Volume collection after correctly creation.

Steps to reproduce bug:

  1. List Volumes at BMC
ubuntu@docker-registry:~$ curl -k -u 'admin:admin' https://odim.local.com:55549/redfish/v1/Systems/1/Storage/BMCStorage/Volumes | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   551  100   551    0     0    845      0 --:--:-- --:--:-- --:--:--   846
{
  "@odata.context": "/redfish/v1/$metadata#VolumeCollection.VolumeCollection",
  "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes",
  "@odata.type": "#VolumeCollection.VolumeCollection",
  "Name": "Volumes Collection",
  "Description": "Volumes Collection",
  "[email protected]": 1,
  "Members": [
    {
      "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/1"
    }
  ],
  "Oem": {}
}
  1. List Volumes at ODIM
ubuntu@docker-registry:~$ curl -k -u 'admin:Od!m12$4' https://odim.local.com:45000/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   439    0   439    0     0   1713      0 --:--:-- --:--:-- --:--:--  1714
{
  "@odata.context": "/redfish/v1/$metadata#VolumeCollection.VolumeCollection",
  "@odata.id": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes",
  "@odata.type": "#VolumeCollection.VolumeCollection",
  "Description": "Volumes Collection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/1"
    }
  ],
  "[email protected]": 1,
  "Name": "Volumes Collection",
  "Oem": {}
}
  1. Create new Volume throught ODIM (Look at response body - links are not standardized is it a second problem?)
ubuntu@docker-registry:~$ curl -X POST -k -u 'admin:Od!m12$4' https://odim.local.com:45000/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes -d '{ "Name": "Test volume"}' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4387    0  4363  100    24   9579     52 --:--:-- --:--:-- --:--:--  9567
{
  "@odata.context": "/redfish/v1/$metadata#Volume.Volume",
  "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2",
  "@odata.type": "#Volume.v1_5_0.Volume",
  "AccessCapabilities": [],
  "Actions": {
    "#Volume.AssignReplicaTarget": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.AssignReplicaTarget"
    },
    "#Volume.ChangeRAIDLayout": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.ChangeRAIDLayout"
    },
    "#Volume.CheckConsistency": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.CheckConsistency"
    },
    "#Volume.CreateReplicaTarget": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.CreateReplicaTarget"
    },
    "#Volume.ForceEnable": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.ForceEnable"
    },
    "#Volume.Initialize": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.Initialize"
    },
    "#Volume.RemoveReplicaRelationship": {
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.RemoveReplicaRelationship"
    },
    "#Volume.ResumeReplication": {
      "[email protected]": [],
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.ResumeReplication"
    },
    "#Volume.ReverseReplicationRelationship": {
      "[email protected]": [],
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.ReverseReplicationRelationship"
    },
    "#Volume.SplitReplication": {
      "[email protected]": [],
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.SplitReplication"
    },
    "#Volume.SuspendReplication": {
      "[email protected]": [],
      "target": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/Actions/Volume.SuspendReplication"
    },
    "Oem": {}
  },
  "AllocatedPools": {
    "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/StoragePools"
  },
  "BlockSizeBytes": null,
  "Capacity": {
    "Data": {
      "AllocatedBytes": null,
      "ConsumedBytes": null,
      "GuaranteedBytes": null,
      "ProvisionedBytes": null
    },
    "IsThinProvisioned": false,
    "Metadata": {
      "AllocatedBytes": null,
      "ConsumedBytes": null,
      "GuaranteedBytes": null,
      "ProvisionedBytes": null
    },
    "Snapshot": {
      "AllocatedBytes": null,
      "ConsumedBytes": null,
      "GuaranteedBytes": null,
      "ProvisionedBytes": null
    }
  },
  "CapacityBytes": null,
  "CapacitySources": [],
  "Compressed": null,
  "Deduplicated": null,
  "Description": "Volume Description",
  "DisplayName": null,
  "Encrypted": null,
  "EncryptionTypes": [],
  "IOPerfModeEnabled": null,
  "IOStatistics": {
    "NonIORequestTime": null,
    "NonIORequests": null,
    "ReadHitIORequests": null,
    "ReadIOKiBytes": null,
    "ReadIORequestTime": null,
    "ReadIORequests": null,
    "WriteHitIORequests": null,
    "WriteIOKiBytes": null,
    "WriteIORequestTime": null,
    "WriteIORequests": null
  },
  "Id": "2",
  "Identifiers": [],
  "Links": {
    "ClassOfService": null,
    "ClientEndpoints": [],
    "ConsistencyGroups": [],
    "DedicatedSpareDrives": [],
    "Drives": [],
    "JournalingMedia": null,
    "Oem": {},
    "OwningStorageResource": null,
    "OwningStorageService": null,
    "ServerEndpoints": [],
    "SpareResourceSets": [],
    "StorageGroups": []
  },
  "LogicalUnitNumber": null,
  "LowSpaceWarningThresholdPercents": [],
  "Manufacturer": null,
  "MaxBlockSizeBytes": null,
  "MediaSpanCount": null,
  "Model": null,
  "NVMeNamespaceProperties": null,
  "Name": "Test volume",
  "Oem": {},
  "Operations": [],
  "OptimumIOSizeBytes": null,
  "ProvisioningPolicy": null,
  "RAIDType": null,
  "ReadCachePolicy": null,
  "RecoverableCapacitySourceCount": null,
  "RemainingCapacityPercent": null,
  "ReplicaInfo": {
    "ConsistencyEnabled": false,
    "ConsistencyState": null,
    "ConsistencyStatus": null,
    "ConsistencyType": null,
    "DataProtectionLineOfService": null,
    "FailedCopyStopsHostIO": false,
    "PercentSynced": null,
    "Replica": null,
    "ReplicaFaultDomain": null,
    "ReplicaPriority": null,
    "ReplicaProgressStatus": null,
    "ReplicaReadOnlyAccess": null,
    "ReplicaRecoveryMode": null,
    "ReplicaRole": null,
    "ReplicaSkewBytes": null,
    "ReplicaState": null,
    "ReplicaType": null,
    "ReplicaUpdateMode": null,
    "RequestedReplicaState": null,
    "SourceReplica": null,
    "SyncMaintained": false,
    "UndiscoveredElement": null,
    "WhenActivated": null,
    "WhenDeactivated": null,
    "WhenEstablished": null,
    "WhenSuspended": null,
    "WhenSynced": null,
    "WhenSynchronized": null
  },
  "ReplicaTargets": [],
  "Status": {
    "Health": null,
    "HealthRollup": null,
    "Oem": {},
    "State": null
  },
  "StorageGroups": {
    "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2/StorageGroups"
  },
  "StripSizeBytes": null,
  "VolumeType": null,
  "VolumeUsage": null,
  "WriteCachePolicy": null,
  "WriteCacheState": null,
  "WriteHoleProtectionPolicy": "Off"
}
  1. List Volume Collection at ODIM (there is no new created volume)
ubuntu@docker-registry:~$ curl -k -u 'admin:Od!m12$4' https://odim.local.com:45000/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   439    0   439    0     0   2122      0 --:--:-- --:--:-- --:--:--  2120
{
  "@odata.context": "/redfish/v1/$metadata#VolumeCollection.VolumeCollection",
  "@odata.id": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes",
  "@odata.type": "#VolumeCollection.VolumeCollection",
  "Description": "Volumes Collection",
  "Members": [
    {
      "@odata.id": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/1"
    }
  ],
  "[email protected]": 1,
  "Name": "Volumes Collection",
  "Oem": {}
}
  1. List volumes at BMC (new volume exist)
ubuntu@docker-registry:~$ curl -k -u 'admin:admin' https://odim.local.com:55549/redfish/v1/Systems/1/Storage/BMCStorage/Volumes | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   618  100   618    0     0   3883      0 --:--:-- --:--:-- --:--:--  3886
{
  "@odata.context": "/redfish/v1/$metadata#VolumeCollection.VolumeCollection",
  "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes",
  "@odata.type": "#VolumeCollection.VolumeCollection",
  "Name": "Volumes Collection",
  "Description": "Volumes Collection",
  "[email protected]": 2,
  "Members": [
    {
      "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/1"
    },
    {
      "@odata.id": "/redfish/v1/Systems/1/Storage/BMCStorage/Volumes/2"
    }
  ],
  "Oem": {}
}
ubuntu@docker-registry:~$ 

  1. If you try to GET a new volume which is not exist in ODIM Volumes Collection - then you GET it correctly
ubuntu@docker-registry:~$ curl -k -u 'admin:Od!m12$4' https://odim.local.com:45000/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2 | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4881    0  4881    0     0  10961      0 --:--:-- --:--:-- --:--:-- 10943
{
  "@odata.context": "/redfish/v1/$metadata#Volume.Volume",
  "@odata.id": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2",
  "@odata.type": "#Volume.v1_5_0.Volume",
  "AccessCapabilities": [],
  "Actions": {
    "#Volume.AssignReplicaTarget": {
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.AssignReplicaTarget"
    },
    "#Volume.ChangeRAIDLayout": {
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.ChangeRAIDLayout"
    },
    "#Volume.CheckConsistency": {
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.CheckConsistency"
    },
    "#Volume.CreateReplicaTarget": {
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.CreateReplicaTarget"
    },
    "#Volume.ForceEnable": {
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.ForceEnable"
    },
    "#Volume.Initialize": {
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.Initialize"
    },
    "#Volume.RemoveReplicaRelationship": {
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.RemoveReplicaRelationship"
    },
    "#Volume.ResumeReplication": {
      "[email protected]": [],
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.ResumeReplication"
    },
    "#Volume.ReverseReplicationRelationship": {
      "[email protected]": [],
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.ReverseReplicationRelationship"
    },
    "#Volume.SplitReplication": {
      "[email protected]": [],
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.SplitReplication"
    },
    "#Volume.SuspendReplication": {
      "[email protected]": [],
      "target": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/Actions/Volume.SuspendReplication"
    },
    "Oem": {}
  },
  "AllocatedPools": {
    "@odata.id": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/StoragePools"
  },
  "BlockSizeBytes": null,
  "Capacity": {
    "Data": {
      "AllocatedBytes": null,
      "ConsumedBytes": null,
      "GuaranteedBytes": null,
      "ProvisionedBytes": null
    },
    "IsThinProvisioned": false,
    "Metadata": {
      "AllocatedBytes": null,
      "ConsumedBytes": null,
      "GuaranteedBytes": null,
      "ProvisionedBytes": null
    },
    "Snapshot": {
      "AllocatedBytes": null,
      "ConsumedBytes": null,
      "GuaranteedBytes": null,
      "ProvisionedBytes": null
    }
  },
  "CapacityBytes": null,
  "CapacitySources": [],
  "Compressed": null,
  "Deduplicated": null,
  "Description": "Volume Description",
  "DisplayName": null,
  "Encrypted": null,
  "EncryptionTypes": [],
  "IOPerfModeEnabled": null,
  "IOStatistics": {
    "NonIORequestTime": null,
    "NonIORequests": null,
    "ReadHitIORequests": null,
    "ReadIOKiBytes": null,
    "ReadIORequestTime": null,
    "ReadIORequests": null,
    "WriteHitIORequests": null,
    "WriteIOKiBytes": null,
    "WriteIORequestTime": null,
    "WriteIORequests": null
  },
  "Id": "2",
  "Identifiers": [],
  "Links": {
    "ClassOfService": null,
    "ClientEndpoints": [],
    "ConsistencyGroups": [],
    "DedicatedSpareDrives": [],
    "Drives": [],
    "JournalingMedia": null,
    "Oem": {},
    "OwningStorageResource": null,
    "OwningStorageService": null,
    "ServerEndpoints": [],
    "SpareResourceSets": [],
    "StorageGroups": []
  },
  "LogicalUnitNumber": null,
  "LowSpaceWarningThresholdPercents": [],
  "Manufacturer": null,
  "MaxBlockSizeBytes": null,
  "MediaSpanCount": null,
  "Model": null,
  "NVMeNamespaceProperties": null,
  "Name": "Test volume",
  "Oem": {},
  "Operations": [],
  "OptimumIOSizeBytes": null,
  "ProvisioningPolicy": null,
  "RAIDType": null,
  "ReadCachePolicy": null,
  "RecoverableCapacitySourceCount": null,
  "RemainingCapacityPercent": null,
  "ReplicaInfo": {
    "ConsistencyEnabled": false,
    "ConsistencyState": null,
    "ConsistencyStatus": null,
    "ConsistencyType": null,
    "DataProtectionLineOfService": null,
    "FailedCopyStopsHostIO": false,
    "PercentSynced": null,
    "Replica": null,
    "ReplicaFaultDomain": null,
    "ReplicaPriority": null,
    "ReplicaProgressStatus": null,
    "ReplicaReadOnlyAccess": null,
    "ReplicaRecoveryMode": null,
    "ReplicaRole": null,
    "ReplicaSkewBytes": null,
    "ReplicaState": null,
    "ReplicaType": null,
    "ReplicaUpdateMode": null,
    "RequestedReplicaState": null,
    "SourceReplica": null,
    "SyncMaintained": false,
    "UndiscoveredElement": null,
    "WhenActivated": null,
    "WhenDeactivated": null,
    "WhenEstablished": null,
    "WhenSuspended": null,
    "WhenSynced": null,
    "WhenSynchronized": null
  },
  "ReplicaTargets": [],
  "Status": {
    "Health": null,
    "HealthRollup": null,
    "Oem": {},
    "State": null
  },
  "StorageGroups": {
    "@odata.id": "/redfish/v1/Systems/2ab8e813-8b5d-4228-b2f5-e246cefdff79:1/Storage/BMCStorage/Volumes/2/StorageGroups"
  },
  "StripSizeBytes": null,
  "VolumeType": null,
  "VolumeUsage": null,
  "WriteCachePolicy": null,
  "WriteCacheState": null,
  "WriteHoleProtectionPolicy": "Off"
}
@ArturBaryla ArturBaryla added the type:bug This tag is attached to 'bug' issue during creation label Feb 12, 2021
@Bharath-KKB Bharath-KKB added prio:normal normal priority, can be taken up after high priority issues are addressed status:confirmed Issue is accepted and implementation will be taken up at the earliest subject to priorities labels Feb 16, 2021
@ehaligow
Copy link
Collaborator

ehaligow commented Aug 5, 2021

Hi, @Bharath-KKB
could take a look here? Is the System rediscovery necessary for the newly created Volume to appear on the Volume list? The newly created Volume does not appear in DB (as it does not appear in the Volume list) until we send GET at it.

@Bharath-KKB
Copy link
Contributor

I think HPE and Dell plugins handle this differently. iLO needs a reboot, Dell may or may not need a reboot depending on the request.
When you do a GET on the volume that does not exist in ODIM, ODIM sends the request to plugin that triggers a rediscovery again. I will ask the team to respond. This is not necessarily a defect.

@bharath-b-hpe
Copy link
Contributor

Hi @ehaligow

For the newly created volume to get updated in ODIM, the server should send ResourceAdded event with the volume ID in OriginOfCondition or user has to do a GET on the new the volume ID to trigger rediscovery in both cases. And the same is expected for volume deletion too, where ResourceRemoved event is required to remove it in ODIM.

Assuming the scenario was observed when using BMC simulator, could you please verify the scenario by making the changes to send expected event during volume add/delete scenarios and let us know if the observed behavior is as expected.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prio:normal normal priority, can be taken up after high priority issues are addressed status:confirmed Issue is accepted and implementation will be taken up at the earliest subject to priorities type:bug This tag is attached to 'bug' issue during creation
Projects
None yet
Development

No branches or pull requests

4 participants