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

enter_modify #342

Closed
wants to merge 40 commits into from
Closed

enter_modify #342

wants to merge 40 commits into from

Conversation

LYPWYT
Copy link

@LYPWYT LYPWYT commented Nov 10, 2023

fix #324
Make the curveadm enter command enter the leader container without parameters

Cyber-SiKu and others added 30 commits February 22, 2023 14:14
Signed-off-by: Cyber-SiKu <Cyber-SiKu@outlook.com>
Signed-off-by: Cyber-SiKu <Cyber-SiKu@outlook.com>
With database disk records commited by `disks.yaml`,
disk formatting cloud be performed without `format.yaml`.

And it will get and wirte disk `size` and `URI` during
disk formatting, thus record the ID of service(chunkserver)
with associated disk when deploy curvebs cluster. Use
`curveadm disks ls` to view all disk information.

Usage:
        curveadm disks commit /path/to/disks.yaml
        curveadm disks ls
        curveadm format

Signed-off-by: Lijin Xiong <lijin.xiong@zstack.io>
Feature: support managing disk information in database
Disk UUID will be wrote into the config of service(chunkserver)
container during curvebs deployment if disks `service_mount_device`
was set `true`, then the service could directly mount disk device
via `entrypoint.sh` and restart automatically after host power recover.

Signed-off-by: Lijin Xiong <lijin.xiong@zstack.io>
Feature: support direct disk mounting for service container
Signed-off-by: Cyber-SiKu <Cyber-SiKu@outlook.com>
Signed-off-by: Cyber-SiKu <Cyber-SiKu@outlook.com>

Set the restart policy of the client container to unless-stopped,
so that it will automatically remount when the machine restarts

Signed-off-by: Cyber-SiKu <Cyber-SiKu@outlook.com>
Signed-off-by: fengshunli <1171313930@qq.com>
Signed-off-by: fengshunli <1171313930@qq.com>
Signed-off-by: fengshunli <1171313930@qq.com>
Signed-off-by: fengshunli <1171313930@qq.com>
Co-authored-by: jolly-sy <757050468@qq.com>
Co-authored-by: Hanqing Wu <wuhanqing@corp.netease.com>

Signed-off-by: jolly-sy <757050468@qq.com>
Signed-off-by: Cyber-SiKu <Cyber-SiKu@outlook.com>
Signed-off-by: wanghai01 <seanhaizi@163.com>
Signed-off-by: wanghai01 <seanhaizi@163.com>
Signed-off-by: wanghai01 <seanhaizi@163.com>
Support manage curve monitor, curve website and support http service
Signed-off-by: montaguelhz <1443171175@qq.com>
Signed-off-by: wanghai01 <seanhaizi@163.com>
Signed-off-by: wanghai01 <seanhaizi@163.com>
fix generate target.json when curvefs
Signed-off-by: wanghai01 <seanhaizi@163.com>
add dirs http service need
Signed-off-by: wanghai01 <seanhaizi@163.com>
Signed-off-by: sjf <s1973853034@163.com>
Signed-off-by: jyf111 <jinyufeng2000@gmail.com>
[fix]playbook: fix format related variables position
Wine93 and others added 4 commits September 12, 2023 09:45
Signed-off-by: Wine93 <wine19930114@gmail.com>
…tion

solution: execute the ss command in a temporary container to precheck for ports in use instead

Signed-off-by: jyf111 <jinyufeng2000@gmail.com>
Signed-off-by: xiaoming <357447923@qq.com>

[fix]playbook: fix format related variables position
Signed-off-by: sjf <s1973853034@163.com>

[fix] add support for recognizing kernel versions like "3.15.0_.*"

Signed-off-by: jyf111 <jinyufeng2000@gmail.com>

support enable etcd auth

Signed-off-by: wanghai01 <seanhaizi@163.com>

Feature: podman can be an alternative container engine

Signed-off-by: caoxianfei1 <caoxianfei@corp.netease.com>

bugfix: docker ps specify both --format and --quiet will warning since v24.0.0.

WARNING: Ignoring custom format, because both --format and --quiet are
set.

Signed-off-by: caoxianfei1 <caoxianfei@corp.netease.com>

change replicas to instances

Signed-off-by: tec-rubbish maker <zhaoyi_114@outlook.com>

change topology variable

change service_replicas_sequence and format_replicas_sequence to service_instances_sequence and format_instances_sequence

Signed-off-by: tec-rubbish maker <zhaoyi_114@outlook.com>

fix the worng instances

Signed-off-by: tec-rubbish maker <zhaoyi_114@outlook.com>

mistake

Signed-off-by: tec-rubbish maker <zhaoyi_114@outlook.com>

Update cli/command/status.go

Signed-off-by: Wine93 <wine19930114@gmail.com>

[fix] older versions of the ss command do not have the --no-header option

solution: execute the ss command in a temporary container to precheck for ports in use instead

Signed-off-by: jyf111 <jinyufeng2000@gmail.com>
Signed-off-by: xiaoming <357447923@qq.com>
Signed-off-by: sjf <s1973853034@163.com>
@LYPWYT LYPWYT marked this pull request as ready for review November 11, 2023 07:14
@caoxianfei1
Copy link
Contributor

@LYPWYT BTW, squash into one commit first.

} else {
// If no id parameter, execute the following
// 2) generate get status playbook
statusForLeaderOptions := statusOptions{id: "*", role: "*", host: "*"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be only need role: "mds"

if err != nil {
return err
}
// 4) display service status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is improper

}
// 4) display service status
statuses := []task.ServiceStatus{}
value := curveadm.MemStorage().Get(comm.KEY_ALL_SERVICE_STATUS)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be we can set other KEY that no need to be same with status command.

Comment on lines 242 to 243
case GET_SERVICE_STATUS_FOR_LEADER:
t, err = comm.NewGetServiceStatusForLeaderTask(curveadm, config.GetDC(i))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GET_MDS_LEADER is better?

Comment on lines 342 to 347
t.AddStep(&Step2GetListenPorts{
ContainerId: containerId,
Status: &status,
Ports: &ports,
ExecOptions: curveadm.ExecOptions(),
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The step is not necessary and define other function and struct instead of using ServiceStatus.

Comment on lines 355 to 388
t.AddStep(&step2FormatServiceStatus{
dc: dc,
serviceId: serviceId,
containerId: containerId,
isLeader: &isLeader,
ports: &ports,
status: &status,
memStorage: curveadm.MemStorage(),
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completed modifications as required

Signed-off-by: lyp <1647564982@qq.com>

enter_modify_1

Signed-off-by: lyp <1647564982@qq.com>

error handling enter

Signed-off-by: lyp <1647564982@qq.com>

error handling enter

Signed-off-by: lyp <1647564982@qq.com>

enter handling enter

Signed-off-by: lyp <1647564982@qq.com>

enter modify 2

Signed-off-by: lyp <1647564982@qq.com>
@caoxianfei1
Copy link
Contributor

caoxianfei1 commented Nov 24, 2023

please push it to develop branch again.

@LYPWYT LYPWYT closed this Nov 29, 2023
@LYPWYT LYPWYT reopened this Nov 29, 2023
@LYPWYT LYPWYT closed this Nov 29, 2023
@LYPWYT LYPWYT reopened this Nov 29, 2023
@LYPWYT LYPWYT closed this Nov 29, 2023
@LYPWYT LYPWYT reopened this Nov 29, 2023
@LYPWYT LYPWYT closed this Nov 29, 2023
@LYPWYT LYPWYT reopened this Nov 29, 2023
@LYPWYT LYPWYT changed the base branch from tombstone to develop November 29, 2023 13:23
@LYPWYT LYPWYT changed the base branch from develop to tombstone November 30, 2023 01:35
@LYPWYT LYPWYT changed the base branch from tombstone to develop November 30, 2023 02:20
@LYPWYT LYPWYT changed the base branch from develop to tombstone November 30, 2023 09:54
@LYPWYT LYPWYT changed the base branch from tombstone to develop November 30, 2023 10:36
@caoxianfei1
Copy link
Contributor

@LYPWYT rebase mistake?

@LYPWYT LYPWYT closed this by deleting the head repository Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

curveadm enter command can directly enter the leader container