-
Notifications
You must be signed in to change notification settings - Fork 1.4k
flasharray/kvm/adaptive: NVMe-TCP transport for FlashArray primary storage #13061
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
Open
genegr
wants to merge
13
commits into
apache:main
Choose a base branch
from
genegr:feat/flasharray-nvme-tcp-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+893
−32
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e861680
adapter: add NVMETCP address type and FlashArrayConnection.nsid
b6fe9f4
flasharray: support NVMe-TCP transport
11aa58d
storage: add NVMeTCP storage pool type
07be549
kvm: add MultipathNVMeOFAdapterBase and NVMeTCPAdapter
578c933
adaptive: pick NVMeTCP pool type when transport=nvme-tcp
f192351
docs: note NVMe-TCP support on the FlashArray adaptive plugin in Pend…
77dc400
kvm: implement copyPhysicalDisk on MultipathNVMeOFAdapterBase
genegr cc360cf
kvm/flasharray: address review feedback on NVMe-TCP PR
genegr deb7a3e
ui: expose NVMe-TCP transport for FlashArray primary storage
f3804b8
kvm: align MultipathNVMeOFPool with KVMStoragePool API change
81147db
kvm: guard parseAndValidatePath against null inPath
ca9ca20
kvm/flasharray/ui: address Copilot review round 3 on NVMe-TCP PR
43a15b5
flasharray: tighten NVMe-TCP EUI-128 validation
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
471 changes: 471 additions & 0 deletions
471
...visors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/MultipathNVMeOFAdapterBase.java
Large diffs are not rendered by default.
Oops, something went wrong.
157 changes: 157 additions & 0 deletions
157
...s/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/MultipathNVMeOFPool.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| package com.cloud.hypervisor.kvm.storage; | ||
|
|
||
| import java.util.HashMap; | ||
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| import org.apache.cloudstack.utils.qemu.QemuImg; | ||
| import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat; | ||
| import org.joda.time.Duration; | ||
|
|
||
| import com.cloud.agent.api.to.HostTO; | ||
| import com.cloud.hypervisor.kvm.resource.KVMHABase.HAStoragePool; | ||
| import com.cloud.storage.Storage; | ||
| import com.cloud.storage.Storage.ProvisioningType; | ||
|
|
||
| /** | ||
| * KVMStoragePool for NVMe-over-Fabrics pools. Mirror of | ||
| * {@link MultipathSCSIPool} for adapters based on | ||
| * {@link MultipathNVMeOFAdapterBase}. Every data operation is delegated | ||
| * back to the adapter; the pool itself only tracks addressing/identity. | ||
| */ | ||
| public class MultipathNVMeOFPool implements KVMStoragePool { | ||
| private final String uuid; | ||
| private final String sourceHost; | ||
| private final int sourcePort; | ||
| private final String sourceDir; | ||
| private final Storage.StoragePoolType storagePoolType; | ||
| private final StorageAdaptor storageAdaptor; | ||
| private final Map<String, String> details; | ||
| private long capacity; | ||
| private long used; | ||
| private long available; | ||
|
|
||
| public MultipathNVMeOFPool(String uuid, String host, int port, String path, | ||
| Storage.StoragePoolType poolType, Map<String, String> poolDetails, StorageAdaptor adaptor) { | ||
| this.uuid = uuid; | ||
| this.sourceHost = host; | ||
| this.sourcePort = port; | ||
| this.sourceDir = path; | ||
| this.storagePoolType = poolType; | ||
| this.storageAdaptor = adaptor; | ||
| this.details = poolDetails; | ||
| this.capacity = 0; | ||
| this.used = 0; | ||
| this.available = 0; | ||
| } | ||
|
|
||
| public MultipathNVMeOFPool(String uuid, StorageAdaptor adaptor) { | ||
| this.uuid = uuid; | ||
| this.sourceHost = null; | ||
| this.sourcePort = -1; | ||
| this.sourceDir = null; | ||
| this.storagePoolType = Storage.StoragePoolType.NVMeTCP; | ||
| this.storageAdaptor = adaptor; | ||
| this.details = new HashMap<>(); | ||
| this.capacity = 0; | ||
| this.used = 0; | ||
| this.available = 0; | ||
| } | ||
|
|
||
| @Override | ||
| public KVMPhysicalDisk createPhysicalDisk(String volumeUuid, ProvisioningType provisioningType, long size, byte[] passphrase) { | ||
| return null; | ||
| } | ||
|
|
||
| @Override | ||
| public KVMPhysicalDisk createPhysicalDisk(String volumeUuid, PhysicalDiskFormat format, ProvisioningType provisioningType, long size, byte[] passphrase) { | ||
| return null; | ||
| } | ||
|
|
||
|
Comment on lines
+78
to
+87
|
||
| @Override | ||
| public boolean connectPhysicalDisk(String volumeUuid, Map<String, String> details) { | ||
| return storageAdaptor.connectPhysicalDisk(volumeUuid, this, details, false); | ||
| } | ||
|
|
||
| @Override | ||
| public KVMPhysicalDisk getPhysicalDisk(String volumeId) { | ||
| return storageAdaptor.getPhysicalDisk(volumeId, this); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean disconnectPhysicalDisk(String volumeUuid) { | ||
| return storageAdaptor.disconnectPhysicalDisk(volumeUuid, this); | ||
| } | ||
|
|
||
| @Override | ||
| public boolean deletePhysicalDisk(String volumeUuid, Storage.ImageFormat format) { | ||
| return true; | ||
| } | ||
|
DaanHoogland marked this conversation as resolved.
|
||
|
|
||
| @Override | ||
| public List<KVMPhysicalDisk> listPhysicalDisks() { | ||
| return null; | ||
| } | ||
|
DaanHoogland marked this conversation as resolved.
Comment on lines
+108
to
+111
|
||
|
|
||
| @Override | ||
| public String getUuid() { | ||
| return uuid; | ||
| } | ||
|
|
||
| public void setCapacity(long capacity) { this.capacity = capacity; } | ||
| @Override public long getCapacity() { return this.capacity; } | ||
| public void setUsed(long used) { this.used = used; } | ||
| @Override public long getUsed() { return this.used; } | ||
| public void setAvailable(long available) { this.available = available; } | ||
| @Override public long getAvailable() { return this.available; } | ||
|
|
||
| @Override public boolean refresh() { return false; } | ||
|
|
||
| @Override public boolean isExternalSnapshot() { return true; } | ||
| @Override public String getLocalPath() { return null; } | ||
| @Override public String getSourceHost() { return this.sourceHost; } | ||
| @Override public String getSourceDir() { return this.sourceDir; } | ||
| @Override public int getSourcePort() { return this.sourcePort; } | ||
| @Override public String getAuthUserName() { return null; } | ||
| @Override public String getAuthSecret() { return null; } | ||
| @Override public Storage.StoragePoolType getType() { return storagePoolType; } | ||
| @Override public boolean delete() { return false; } | ||
| @Override public QemuImg.PhysicalDiskFormat getDefaultFormat() { return QemuImg.PhysicalDiskFormat.RAW; } | ||
| @Override public boolean createFolder(String path) { return false; } | ||
| @Override public boolean supportsConfigDriveIso() { return false; } | ||
| @Override public Map<String, String> getDetails() { return this.details; } | ||
| @Override public boolean isPoolSupportHA() { return false; } | ||
| @Override public String getHearthBeatPath() { return null; } | ||
|
|
||
| @Override | ||
| public String createHeartBeatCommand(HAStoragePool primaryStoragePool, String hostPrivateIp, boolean hostValidation) { | ||
| return null; | ||
| } | ||
|
|
||
| @Override public String getStorageNodeId() { return null; } | ||
|
|
||
| @Override | ||
| public Boolean hasHeartBeat(HAStoragePool pool, HostTO host) { return null; } | ||
|
|
||
| @Override | ||
| public Boolean hasVmActivity(HAStoragePool pool, HostTO host, Duration activityScriptTimeout, | ||
| String volumeUUIDListString, String vmActivityCheckPath, long duration) { | ||
| return null; | ||
| } | ||
| } | ||
51 changes: 51 additions & 0 deletions
51
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/NVMeTCPAdapter.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| // Licensed to the Apache Software Foundation (ASF) under one | ||
| // or more contributor license agreements. See the NOTICE file | ||
| // distributed with this work for additional information | ||
| // regarding copyright ownership. The ASF licenses this file | ||
| // to you under the Apache License, Version 2.0 (the | ||
| // "License"); you may not use this file except in compliance | ||
| // with the License. You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, | ||
| // software distributed under the License is distributed on an | ||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| // KIND, either express or implied. See the License for the | ||
| // specific language governing permissions and limitations | ||
| // under the License. | ||
|
|
||
| package com.cloud.hypervisor.kvm.storage; | ||
|
|
||
| import com.cloud.storage.Storage; | ||
| import org.apache.logging.log4j.LogManager; | ||
| import org.apache.logging.log4j.Logger; | ||
|
|
||
| /** | ||
| * StorageAdaptor for the {@link Storage.StoragePoolType#NVMeTCP} pool type. | ||
| * All operational logic lives in {@link MultipathNVMeOFAdapterBase}; this | ||
| * class just binds that logic to a pool type so | ||
| * {@link KVMStoragePoolManager} can find it via reflection. | ||
| */ | ||
| public class NVMeTCPAdapter extends MultipathNVMeOFAdapterBase { | ||
| private static final Logger LOGGER = LogManager.getLogger(NVMeTCPAdapter.class); | ||
|
|
||
| public NVMeTCPAdapter() { | ||
| LOGGER.info("Loaded NVMeTCPAdapter for StorageLayer"); | ||
| } | ||
|
|
||
| @Override | ||
| public String getName() { | ||
| return "NVMeTCPAdapter"; | ||
| } | ||
|
|
||
| @Override | ||
| public Storage.StoragePoolType getStoragePoolType() { | ||
| return Storage.StoragePoolType.NVMeTCP; | ||
| } | ||
|
|
||
| @Override | ||
| public boolean isStoragePoolTypeSupported(Storage.StoragePoolType type) { | ||
| return Storage.StoragePoolType.NVMeTCP.equals(type); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.