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

RFC: Partly fix handling of mountpoints in the 'up' command #519

Merged
merged 1 commit into from
May 16, 2024

Conversation

colinhusu
Copy link
Contributor

The up command right now does not properly handle mountpoints. Partly fix that.

Note that this does not yet fix the case where the current level is the top-level of the mounted module. In that case the up command should switch to the presence container that holds the mounted module. Instead it switches all the way up to the topmost level, so it has the same effect as the top command.

Fixing that would be more involved: co_up() on the top-level cg_obj of a mounted module returns NULL. That case would need to be handled by finding the cg_obj matching the mount-point container, i.e. the path stored in "cli-edit-mtpoint", and setting that as the new cligen_ph_workpoint. But I don't now how to get that cg_obj.

The cli_auto_up command right now does not properly handle
mountpoints.

Fix the case when going up one level inside of a mounted
module.

Note that this does not yet fix the case where the current level
is the top-level of the mounted module. In that case the up command
should switch to the presence container that holds the mounted
module. Instead it switches all the way up to the topmost level, so
it has the same effect as the top command.
@olofhagsand
Copy link
Member

I know,there is a lot of newautocli code in the controller, that needs to be retrofitted into more generic clixon code. But I never got edit modes to work, so the submission is appreciated.

@olofhagsand olofhagsand merged commit 4b33841 into clicon:master May 16, 2024
5 checks passed
@colinhusu
Copy link
Contributor Author

Thanks for merging this!

But I never got edit modes to work, so the submission is appreciated.

Do you remember any specific problems in this area? For me edit mode basically appears to work in combination with mountpoints.

@colinhusu colinhusu deleted the another_mountpoint_fix branch May 22, 2024 06:31
@olofhagsand
Copy link
Member

Operation across mountpoints, such as "up"

@olofhagsand
Copy link
Member

Do you remember any specific problems in this area? For me edit mode basically appears to work in combination with mountpoints.

Not really but there is an issue in the controller project:
clicon/clixon-controller#83

@colinhusu
Copy link
Contributor Author

I don't remember having seen error messages similar to the one in the mentioned clixon-controller issue.

However, I did get some error-messages before due to inconsistent cli-edit-* states caused by earlier calls to up and top commands. But these should be addressed now.

@olofhagsand
Copy link
Member

We will revisit that issue and see if it works now.

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.

2 participants