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

The reliability on agent in GetWorkload()/GetWorkloads() #331

Closed
jasonjoo2010 opened this issue Feb 1, 2021 · 0 comments
Closed

The reliability on agent in GetWorkload()/GetWorkloads() #331

jasonjoo2010 opened this issue Feb 1, 2021 · 0 comments

Comments

@jasonjoo2010
Copy link
Contributor

Let's focus on the publish property of a workload.

Generally the network info would be available only after agent detects and saves it into the store. So it won't be available if the agent hung.

But in CreateWorkload/ReplaceWorkload we could find that it's more like a realtime property:

			// inspect real meta
			var workloadInfo *enginetypes.VirtualizationInfo
			workloadInfo, err = workload.Inspect(ctx) // 补充静态元数据
			if err != nil {
				return errors.WithStack(err)
			}

			// update meta
			if workloadInfo.Networks != nil {
				msg.Publish = utils.MakePublishInfo(workloadInfo.Networks, opts.Entrypoint.Publish)
			}

And I remember in the previous implementations the returned structure of GetContainer() has such thing like inspect data enabling the users to do similar thing.
So is it possible to do similar thing in GetWorkload like CreateWorkload?

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

No branches or pull requests

1 participant