Rename vitastor-cmd to vitastor-cli

nbd-vmsplice
Vitaliy Filippov 2021-09-26 00:52:05 +03:00
parent 4d6b85fe67
commit 065dfef683
9 changed files with 19 additions and 19 deletions

View File

@ -40,7 +40,7 @@ Vitastor на данный момент находится в статусе п
- Драйвер диска для QEMU (собирается вне дерева исходников QEMU)
- Драйвер диска для утилиты тестирования производительности fio (также собирается вне дерева исходников fio)
- NBD-прокси для монтирования образов ядром ("блочное устройство в режиме пользователя")
- Утилита для удаления образов/инодов (vitastor-cmd rm)
- Утилита для удаления образов/инодов (vitastor-cli rm)
- Пакеты для Debian и CentOS
- Статистика операций ввода/вывода и занятого места в разрезе инодов
- Именование инодов через хранение их метаданных в etcd
@ -49,7 +49,7 @@ Vitastor на данный момент находится в статусе п
- Поддержка RDMA/RoCEv2 через libibverbs
- CSI-плагин для Kubernetes
- Базовая поддержка OpenStack: драйвер Cinder, патчи для Nova и libvirt
- Слияние снапшотов (vitastor-cmd merge)
- Слияние снапшотов (vitastor-cli {snap-rm,flatten,merge})
## Планы развития
@ -492,10 +492,10 @@ qemu-system-x86_64 -enable-kvm -m 1024
### Удалить образ
Используйте утилиту vitastor-cmd rm. Например:
Используйте утилиту vitastor-cli rm. Например:
```
vitastor-cmd rm --etcd_address 10.115.0.10:2379/v3 --pool 1 --inode 1 --parallel_osds 16 --iodepth 32
vitastor-cli rm --etcd_address 10.115.0.10:2379/v3 --pool 1 --inode 1 --parallel_osds 16 --iodepth 32
```
### NBD

View File

@ -34,7 +34,7 @@ breaking changes in the future. However, the following is implemented:
- QEMU driver (built out-of-tree)
- Loadable fio engine for benchmarks (also built out-of-tree)
- NBD proxy for kernel mounts
- Inode removal tool (vitastor-cmd rm)
- Inode removal tool (vitastor-cli rm)
- Packaging for Debian and CentOS
- Per-inode I/O and space usage statistics
- Inode metadata storage in etcd
@ -43,7 +43,7 @@ breaking changes in the future. However, the following is implemented:
- RDMA/RoCEv2 support via libibverbs
- CSI plugin for Kubernetes
- Basic OpenStack support: Cinder driver, Nova and libvirt patches
- Snapshot merge tool (vitastor-cmd merge)
- Snapshot merge tool (vitastor-cli {snap-rm,flatten,merge})
## Roadmap

View File

@ -354,7 +354,7 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
return nil, status.Error(codes.Internal, "invalid "+inodeCfgKey+" key in etcd: "+err.Error())
}
// Delete inode data by invoking vitastor-cmd
// Delete inode data by invoking vitastor-cli
args := []string{
"rm", "--etcd_address", strings.Join(etcdUrl, ","),
"--pool", fmt.Sprintf("%d", idx.PoolId),
@ -364,7 +364,7 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
{
args = append(args, "--config_path", ctxVars["configPath"])
}
c := exec.Command("/usr/bin/vitastor-cmd", args...)
c := exec.Command("/usr/bin/vitastor-cli", args...)
var stderr bytes.Buffer
c.Stdout = nil
c.Stderr = &stderr
@ -372,7 +372,7 @@ func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVol
stderrStr := string(stderr.Bytes())
if (err != nil)
{
klog.Errorf("vitastor-cmd rm failed: %s, status %s\n", stderrStr, err)
klog.Errorf("vitastor-cli rm failed: %s, status %s\n", stderrStr, err)
return nil, status.Error(codes.Internal, stderrStr+" (status "+err.Error()+")")
}

View File

@ -514,7 +514,7 @@ class VitastorDriver(driver.CloneableImageVD,
# Clear data
for kv in layers:
args = [
'vitastor-cmd', 'rm', '--pool', str(kv['value']['pool_id']),
'vitastor-cli', 'rm', '--pool', str(kv['value']['pool_id']),
'--inode', str(kv['value']['id']), '--progress', '0',
*(self._vitastor_args())
]

View File

@ -57,7 +57,7 @@ cp -r mon %buildroot/usr/lib/vitastor/mon
%_bindir/vitastor-dump-journal
%_bindir/vitastor-nbd
%_bindir/vitastor-osd
%_bindir/vitastor-cmd
%_bindir/vitastor-cli
%_bindir/vitastor-rm
%_libdir/qemu-kvm/block-vitastor.so
%_libdir/libfio_vitastor.so

View File

@ -54,7 +54,7 @@ cp -r mon %buildroot/usr/lib/vitastor
%_bindir/vitastor-dump-journal
%_bindir/vitastor-nbd
%_bindir/vitastor-osd
%_bindir/vitastor-cmd
%_bindir/vitastor-cli
%_bindir/vitastor-rm
%_libdir/qemu-kvm/block-vitastor.so
%_libdir/libfio_vitastor.so

View File

@ -151,11 +151,11 @@ target_link_libraries(vitastor-nbd
vitastor_client
)
# vitastor-cmd
add_executable(vitastor-cmd
# vitastor-cli
add_executable(vitastor-cli
cli.cpp cli_flatten.cpp cli_merge.cpp cli_rm.cpp cli_snap_rm.cpp
)
target_link_libraries(vitastor-cmd
target_link_libraries(vitastor-cli
vitastor_client
)
@ -240,8 +240,8 @@ target_include_directories(test_cluster_client PUBLIC ${CMAKE_SOURCE_DIR}/src/mo
### Install
install(TARGETS vitastor-osd vitastor-dump-journal vitastor-nbd vitastor-cmd RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install_symlink(${CMAKE_INSTALL_BINDIR}/vitastor-rm vitastor-cmd)
install(TARGETS vitastor-osd vitastor-dump-journal vitastor-nbd vitastor-cli RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install_symlink(${CMAKE_INSTALL_BINDIR}/vitastor-rm vitastor-cli)
install(
TARGETS vitastor_blk vitastor_client
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

View File

@ -9,6 +9,6 @@ LD_PRELOAD=libasan.so.5 \
$ETCDCTL get --prefix '/vitastor/pg/state'
build/src/vitastor-cmd rm --etcd_address $ETCD_URL --pool 1 --inode 1
build/src/vitastor-cli rm --etcd_address $ETCD_URL --pool 1 --inode 1
format_green OK

View File

@ -43,7 +43,7 @@ cmp ./testdata/merged.bin ./testdata/check.bin
$ETCDCTL put /vitastor/config/inode/1/3 '{"parent_id":2,"name":"testimg","size":'$((32*1024*1024))'}'
build/src/vitastor-cmd snap-rm --etcd_address $ETCD_URL testimg@0
build/src/vitastor-cli snap-rm --etcd_address $ETCD_URL testimg@0
qemu-img convert -S 4096 -p \
-f raw "vitastor:etcd_host=127.0.0.1\:$ETCD_PORT/v3:image=testimg" \