Git Product home page Git Product logo

curveadm's People

Contributors

0fatal avatar aspirer avatar caoxianfei1 avatar chengyu-l avatar cyber-siku avatar demoliang avatar fengshunli avatar hdbdn77 avatar ilixiaocui avatar jyf111 avatar lypwyt avatar mfordjody avatar montaguelhz avatar mrdrivingduck avatar seanhai avatar songjf-ttk avatar tiansuo114 avatar tsonglew avatar wherearebugs avatar wine93 avatar wu-hanqing avatar wuhongsong avatar zhanghuidinah avatar zztaki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

curveadm's Issues

curvebs: map/target_add a non-exist volume will failed but no error

[root@prit2-curve-kylin-node1 curvebs-deploy]# curveadm map wp:/vol3 --size 1000GB -c client.yaml  # wp:/vol3 is not exist
Start NEBD Service: [SKIP]
Map Volume: [OK]
[root@prit2-curve-kylin-node1 curvebs-deploy]# lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda             8:0    0 446.6G  0 disk
├─sda1          8:1    0   300M  0 part /boot/efi
└─sda2          8:2    0 356.7G  0 part
  ├─klas-root 252:0    0 340.7G  0 lvm  /
  └─klas-tmp  252:1    0    16G  0 lvm  /tmp
sdb             8:16   0   1.8T  0 disk /mnt/minio-data
sdc             8:32   0   1.8T  0 disk /mnt/monitor
sdd             8:48   0   1.8T  0 disk
sde             8:64   0   1.8T  0 disk
sdf             8:80   0   1.8T  0 disk
sdg             8:96   0   1.8T  0 disk
sdh             8:112  0   1.8T  0 disk
sdi             8:128  0   1.8T  0 disk
sdj             8:144  0   1.8T  0 disk
sdk             8:160  0   1.8T  0 disk
[root@prit2-curve-kylin-node1 curveadm]# docker logs curvebs-target-daemon
tgtd: iser_ib_init(3421) Failed to initialize RDMA; load kernel modules?
tgtd: bs_curve_open(526) can not open curve volume cbd:pool//vol333_wp_, Success

if we add --create to map or target add command, it will mapped or added successfully.

request help: please support plugin and let user customize their devops

Usage Example:

Run Plugin

  • basic:
curveadm plugin run deploy-granafa -c config.yaml
curveadm plugin run mkfs-ext4 /dev/sda /dev/sbb /dev/sdc
curveadm plugin run shell --host "*" 'rm -rf /tmp/*' 
curveadm plugin run scp /path/to/local /path/to/remote
  • alias:
CURVEADM_INVENTORY="~/hosts"
alias nessh='curveadm plugin run ssh'
nessh host1
  • combine plugin:
# vim my-plugin.
curveadm plugin run plugin1
curveadm plugin run plugin2
curveadm plugin run plugin3

Add Plugin

curveadm plugin add PLUGIN-NAME -f /path/to/script
curveadm plugin add PLUGIN-NAME github.com/opencurve/curveadm/plugins/mkfs

List Plugin

curveadm plugin ls

Note:

  • The plugin should support golangbashC++ and etc.
  • The plugin build as one binary and store at ~/.curveadm/plugin.
  • We need plugin storage and let user to contribute their plugin.

curvebs: format failed on CentOS 8

[curve@localhost curveadm.new]$ cat format.yaml
user: curve
ssh_port: 22
private_key_file: /home/curve/.ssh/id_rsa
host:
  - 10.0.2.15
disk:
  - /dev/sdb:/data/chunkserver0:90
  - /dev/sdc:/data/chunkserver1:90
  - /dev/sdd:/data/chunkserver2:90  # device:mount_path:format_percent
[curve@localhost curveadm.new]$ curveadm format -f format.yaml
Start Format Chunkfile Pool: [ERROR]
  + host=10.0.2.15  device=/dev/sdb  mountPoint=/data/chunkserver0  usage=1% [0/1] [ERROR]
  + host=10.0.2.15  device=/dev/sdc  mountPoint=/data/chunkserver1  usage=1% [0/1] [ERROR]
  + host=10.0.2.15  device=/dev/sdd  mountPoint=/data/chunkserver2  usage=1% [0/1] [ERROR]
Error:
Process exited with status 32
See log file for deatil: /home/curve/.curveadm/logs/curveadm-2022-01-25_02-57-32.log


[curve@localhost curveadm]$ cat /home/curve/.curveadm/logs/curveadm-2022-01-25_02-57-32.log
[2022/01/25 02:57:33.162 -05:00] [ERROR] [module.go:99] [execCommand] [[email protected]:22] [command="sudo umount  /dev/sdc"] [error="Process exited with status 32"] [output="umount: /dev/sdc: not mounted.\n"]
[2022/01/25 02:57:33.196 -05:00] [ERROR] [module.go:99] [execCommand] [[email protected]:22] [command="sudo umount  /dev/sdb"] [error="Process exited with status 32"] [output="umount: /dev/sdb: not mounted.\n"]
[2022/01/25 02:57:33.234 -05:00] [ERROR] [module.go:99] [execCommand] [[email protected]:22] [command="sudo umount  /dev/sdd"] [error="Process exited with status 32"] [output="umount: /dev/sdd: not mounted.\n"]


deploy: create logical pool error

when deploy curvefs cluster, will report error like this:

[2022/03/14 11:28:16.217 +08:00] [ERROR] [module.go:99] [execCommand] [[email protected]:22] [command="sudo docker exec 11d54334db424ae539d20bae721523f3471fe31ecc8ab89b583ecd33ef098ed8 bash /curvefs/tools/sbin/wait_chunkservers.sh"] [error="Process exited with status 1"] [output="/curvefs/tools/sbin/wait_chunkservers.sh: line 5: curve_ops_tool: command not found

More noticeable warnings should be given when cleaning up the cluster or service

At present, when cleaning services or clusters, the prompt information is too simple and not clear enough, and users may not be able to clearly understand the consequences of performing related operations, especially those that may cause service suspension or data loss operations. A stronger warning should be displayed to the user, and more complex operation commands to prevent users from misoperation.

[curve@localhost curveadm.new]$ curveadm clean
clean: role=* host=* id=* only=log,data,container
Do you want to continue? [y/N]: (default=N) y
Clean Service: [OK]


[curve@localhost curveadm.new]$ curveadm cluster rm first-cluster
Do you want to continue? [y/N]: (default=N) y
Deleted cluster 'first-cluster'

request help: support bash completion

We know that curveadm support many commands, it's a tedious work for user to type complete command every times, please support bash completion for curveadm, thx!

curveadm: mount and umount error

When I mount with the wrong yaml file, there is no error message.
Error when mount again:
Error: path mounted, please run 'curveadm umount ***' first,

But when using curveadm umount, there is an error, there is an error in the log:
output="***: not mounted

request help: support deploy prometheus/grafana

currently we can deploy prometheus/grafana with docker-compose, but the target.json can not be generated and updated automaticly, we need to deploy them by curveadm and support generating and updating target.json.

Many functions of the client deployed with docker cannot be used

Many functions of the client deployed with docker cannot be used:

  1. Services such as cinder cannot be used
  2. nbd's automount mount cannot be used
  3. curve command does not work 。Including striping, recyclebin recovery volume, etc.
  4. snapshot command does not work
  5. curve-tool command does not work .Unable to set chunkserver pending
  6. nbd map cannot specify parameters
  7. 。。。

doc: Need to provide clearer documentation for scenarios such as upgrading clusters

The current operation of upgrading the cluster version, scaleout the cluster, the operation of upgrading the curveadm tool itself, and other scenarios that require a complex combination of steps, lack of corresponding guidance documents, and it is recommended that they can be improved.

Also we need add some descriptions for configurations, who deploy a cluster can refer these and know how to change them.

Make sudo as an option

The commands in the code are now prefixed with sudo by default, which may introduce

  1. security problems
  2. users actually have permission to follow commands, but not a sudoer, causing tasks to fail. (For example, the user is in the docker group, but not a sudoer)

I feel that sudo should be included as an optional parameter -sudo or --root ? and only add sudo in front of the command after enabling the parameter.

curveadm: build failed on CentOS7

this issue related to golang/go#38373

make failed on

OS: CentOS Linux release 7.9.2009 (Core)
golang version: go version go1.16.13 linux/amd64
git version: git version 1.8.3.1

error messages(an example, may be different):

# make
go build -o sbin/curveadm /root/curveadm/cmd/curveadm/main.go
go: github.com/theupdateframework/[email protected] requires
        github.com/docker/[email protected]: invalid pseudo-version: git fetch --unshallow -f origin in /root/go/pkg/mod/cache/vcs/48fbd2dfabec81f4c93170677bfc89087d4bec07a2d08f6ca5ce3d17962677ee: exit status 128:
        fatal: git fetch-pack: expected shallow list
make: *** [build] Error 1

make successfully after upgrading git version to:
git version: git version 2.24.4

yum -y erase git # this command will remove golang too, so need to install golang again
yum -y install https://repo.ius.io/ius-release-el7.rpm
yum -y install git224 golang

mount and umount

  1. When mounting, the format of mountpoint should be: [hostname:mountpoint], but when using curveadm mount, the format of mountpoint becomes [a string of numbers: /usr/local/curvefs/client/mnt]
  2. Although unmounting with umount is successful, the mount point is unavailable and an error output appears.
    image
    image
  3. Although it shows that umount is successfully uninstalled, the mount point is still inaccessible, and the error output is as follows:
    image
  4. At this time, deleting fs will fail, mds log shows fs_busy, you need to use the tool umount, you can delete successfully at this time.

The prompt message of status command is not so correct

current prompt message during run status command:

[curve@localhost curveadm]$ curveadm cluster add xxx
[curve@localhost curveadm]$ curveadm status
Error: unsupport kind('')

[curve@localhost curveadm]$ curveadm cluster ls
  xxx
[curve@localhost curveadm]$ curveadm cluster checkout xxx
Switched to cluster 'xxx'
[curve@localhost curveadm]$ curveadm status
Error: unsupport kind('')

[curve@localhost curveadm]$ curveadm cluster add yyy -f ../curveadm.new/noservice.yaml
[curve@localhost curveadm]$ curveadm status
Error: unsupport kind('')
[curve@localhost curveadm]$ curveadm cluster checkout yyy
Switched to cluster 'yyy'
[curve@localhost curveadm]$ curveadm status
No service[curve@localhost curveadm]$

[curve@localhost curveadm]$ ./sbin/curveadm cluster add xxx -f ../curveadm.new/newtop.yaml
[curve@localhost curveadm]$ curveadm cluster checkout xxx
Switched to cluster 'xxx'
[curve@localhost curveadm]$ curveadm status
Error:
service(id=71687ea52675) not found
See log file for deatil: /home/curve/.curveadm/logs/curveadm-2022-01-28_01-15-16.log    ### this log file is not exist.

we may change them to these:

[curve@localhost curveadm]$ ./sbin/curveadm cluster add xxx
[curve@localhost curveadm]$ ./sbin/curveadm status
No cluster, please add a cluster firstly
[curve@localhost curveadm]$ ./sbin/curveadm cluster checkout xxx
Switched to cluster 'xxx'
[curve@localhost curveadm]$ ./sbin/curveadm status
Error: cluster topology is empty

[curve@localhost curveadm]$ ./sbin/curveadm cluster add xxx -f ../curveadm.new/noservice.yaml
[curve@localhost curveadm]$ ./sbin/curveadm cluster checkout xxx
Switched to cluster 'xxx'
[curve@localhost curveadm]$ ./sbin/curveadm status
No service, please check your cluster topology

[curve@localhost curveadm]$ ./sbin/curveadm cluster add xxx -f ../curveadm.new/newtop.yaml
[curve@localhost curveadm]$ ./sbin/curveadm status
No cluster, please add a cluster firstly
[curve@localhost curveadm]$ ./sbin/curveadm cluster checkout xxx
Switched to cluster 'xxx'
[curve@localhost curveadm]$ ./sbin/curveadm status
Error:
service(id=d585d74ac18f) not found
Did you deploy the cluster?

should check volume-name format while mapping nbd

$ curveadm map <user>:<volume-name> -c client.yaml --create --size 10GB
<volume-name> must be start with '/' , but many users ignored it even we describe this note in manual.

so I think we should add some checks about the format of <volume-name>, such as if it is not start with '/', we print some error messages to users to suggest them using correct format.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.