Comments (16)
Hello, I would like to work on this issue. Please give me some follow-ups.
from network.
@codetronaut great! @thom311 @tyll could you please give advice? By the way, using the CheckPoint feature is already implemented in #119 , I believe.
from network.
@codetronaut from a quick look I think the best place to start would be to read about the CheckPoint feature referenced above and look in PR #119 to see how it is used in the network role (in the internal module which implements most of the functionality, which is here: https://github.com/linux-system-roles/network/blob/master/library/network_connections.py). Then you could modify the module to introduce a timeout, after which the state is rolled back. And introduce a new operation which would cancel the timeout. Finally, you would change the Ansible parts of the role so that it calls the module asynchronously, then reconnects and invokes the cancellation of the timeout. (Unless the maintainers have different suggestions.)
from network.
I think the important bit here are how to implement async modules. It's more a question about ansible module development... I am not familiar with it, but I'd look how other modules handle that. For example, how can the SSH module change the port? How does reboot work?
from network.
An example of a test which reboots the managed host can be seen here:
https://github.com/linux-system-roles/selinux/blob/6cd1ec8fdebdb92a789b14e5a44fe77f0a3d8ecd/tests/selinux_apply_reboot.yml#L12
from network.
here is some information about async tasks: https://docs.ansible.com/ansible/latest/user_guide/playbooks_async.html
from network.
@thom311 what is the SSH module? I don't see it in the module index.
from network.
@pcahyna will check the #119.
will ask if get stuck :)
Also, I am a little beginner but will do my best to resolve this issue.
from network.
@codetronaut in this case, because most of the role functionality is implemented in an Ansible module, the Ansible documentation about developing modules could be useful: https://docs.ansible.com/ansible/latest/dev_guide/index.html
from network.
@codetronaut you don't need to dive too much into the details of Ansible module development though, as you are not developing a module from scratch, the module already exists and you will need to only extend it a bit.
from network.
sure @pcahyna , will do it.
from network.
@codetronaut : @tyll uncovered some problems in the checkpoint implementation, see #154, so the code in #119 is likely to get changed.
from network.
Sure.
from network.
Then you could modify the module to introduce a timeout, after which the state is rolled back. And introduce a new operation which would cancel the timeout.
please guide me for this, I understand the part after the creation of the module i.e to insert into the ansible's python file.
from network.
@codetronaut thank you for your patience. I just submitted a PR to fix the current bug in the implementation (#193) and I thought about this feature. IMHO the next step after the bug is fixed is to refactor the code to
- Not to commit/destroy the checkpoint directly in the module when the transaction is complete but instead to return the dbus path of the checkpoint (for example
/org/freedesktop/NetworkManager/Checkpoint/66
) - Add another step in the role tasks file after the current call of the module to destroy the checkpoint. Maybe it can just be a command like
gdbus call --system --dest org.freedesktop.NetworkManager --object-path /org/freedesktop/NetworkManager --method org.freedesktop.NetworkManager.CheckpointDestroy /org/freedesktop/NetworkManager/Checkpoint/66
when the network_provider is nm.
Afterwards we can consider additional checks that would call CheckpointRollback
after doing a specific check. This needs further discussion. What do you think? (also @pcahyna or @thom311 please comment).
from network.
Actually my comment probably belongs better to #123 but this all needs to play well together.
from network.
Related Issues (20)
- network_state functionality doesn't appear to be idempotent HOT 1
- pkey interfaces cannot be deleted reliably HOT 12
- Feature request: support adding tun devices HOT 14
- Routing rules improvement HOT 6
- Eliminate non-inclusive language HOT 5
- Address CodeQL warnings HOT 4
- Network override HOT 1
- add 'auto-dns' option also to network_connections HOT 6
- How to keep existing profile name HOT 3
- Verify and document no-aaaa DNS option HOT 2
- network_state should not change IPv6 state when not configured HOT 2
- Question Changing the IP of the remote host HOT 3
- ipv4.dns-data: unknown property (7) HOT 6
- RFE: Add support for DNS caching HOT 3
- WireGuard support HOT 1
- Rename the task `name: Check if rpm ostree system - cannot test` into a meaningful name explaining the reason for skipping test HOT 2
- Add support for veth pair HOT 3
- Add support for scope and src route options HOT 4
- not idempotent HOT 4
- Need further output from "check" mode HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from network.