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

[Server] support agent remote command #6392

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

roryye
Copy link
Contributor

@roryye roryye commented May 11, 2024

This PR is for:

  • Server

@roryye roryye marked this pull request as draft May 11, 2024 02:49
@roryye roryye force-pushed the support-agent-remote-cmd branch 9 times, most recently from a6de7ac to b199377 Compare May 15, 2024 08:23
@roryye roryye force-pushed the support-agent-remote-cmd branch 9 times, most recently from 940fceb to de1ef23 Compare May 22, 2024 08:19
)

var (
AgentRemoteExecMap = make(map[string]*CMDManager)
Copy link
Contributor

Choose a reason for hiding this comment

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

考虑并发

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

LinuxNamespaceDoneCH: make(chan struct{}, 1),

resp: &model.RemoteExecResp{},
stream: stream,
Copy link
Contributor

Choose a reason for hiding this comment

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

stream传过来 要做啥处理

Copy link
Contributor Author

Choose a reason for hiding this comment

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

冗余的,没用到,我删除下

log.Errorf("failed to receive the initial message: %v", err)
return err
}
key := resp.AgentId.GetIp() + "-" + resp.AgentId.GetMac()
Copy link
Contributor

Choose a reason for hiding this comment

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

这个key要org-id么

Copy link
Contributor Author

Choose a reason for hiding this comment

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

也可以,方便日志输出排查

@roryye roryye force-pushed the support-agent-remote-cmd branch 7 times, most recently from 9dd3dee to 3f38d8a Compare May 22, 2024 16:56
@roryye roryye force-pushed the support-agent-remote-cmd branch 28 times, most recently from 9747d12 to 8c6ccc7 Compare May 24, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants