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

undefined behavior during commit #481

Closed
khromenokroman opened this issue Jan 22, 2024 · 1 comment
Closed

undefined behavior during commit #481

khromenokroman opened this issue Jan 22, 2024 · 1 comment
Labels

Comments

@khromenokroman
Copy link

khromenokroman commented Jan 22, 2024

Hello, undefined behavior during commit, I am writing a plugin, I wrote my function, I made a callback for commit_validate as a result, when I commit, I get my function executed 2 times, I can't understand this is how it should be or I did something wrong in the documentation I did not find an answer, thank you

янв 22 21:54:13  systemd[1]: Stopped Clixon backend API service.
янв 22 21:54:13  systemd[1]: Starting Clixon backend API service...
янв 22 21:54:13  clixon_backend[10917]: INIT clixon-plug-useradm version 0.0.5 created
янв 22 21:54:13  clixon_backend[10917]: START clixon-plug-useradm
янв 22 21:54:13 clixon_backend[10919]: clixon_backend: 10919 Started
янв 22 21:54:13 systemd[1]: Started Clixon backend API service.
янв 22 21:54:29  clixon_backend[10919]: Getting users from the configuration...
янв 22 21:54:29 clixon_backend[10919]: 
                                               Username:          admin                                                                                                         
                                               Password Hashed:   7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC                                                                      
                                               Group:             administrator                                                                                                 
янв 22 21:54:29  clixon_backend[10919]: 
                                               Username:          oper                                                                                                          
                                               Password Hashed:   7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC                                                                      
                                               Group:             operator                                                                                                      
янв 22 21:54:29 nclixon_backend[10919]: 
                                               Username:          admin                                                                                                         
                                               Password Hashed:   7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC                                                                      
                                               Group:             system-administrator                                                                                          
янв 22 21:54:29  clixon_backend[10919]: 
                                               Username:          sysadmin                                                                                                      
                                               Password Hashed:   123                                                                                                           
                                               Group:             system-administrator                                                                                          
янв 22 21:54:29 n clixon_backend[10919]: Send data: {"body":"all","context":{"admin":{"password-hashed":"7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC","role":"system-administrator"},"oper":{"password-hashed":"7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC","role":"operator"},"sysadmin":{"password-hashed":"123","role":"system-administrator"}}}
янв 22 21:54:29  systemd[1]: Starting Super starter for python clixon_plug_useradm...
янв 22 21:54:29  run_super_py[10925]: Need to start script clixon_plug_useradm with json all for context {'admin': {'password-hashed': '7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC', 'role': 'system-administrator'}, 'oper': {'password-hashed': '7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC', 'role': 'operator'}, 'sysadmin': {'password-hashed': '123', 'role': 'system-administrator'}}
янв 22 21:54:29  systemd[1]: sudo_py@clixon_plug_useradm.service: Succeeded.
янв 22 21:54:29 systemd[1]: Finished Super starter for python clixon_plug_useradm.
янв 22 21:54:29  clixon_backend[10919]: Send data is done
янв 22 21:54:29  clixon_backend[10919]: clixon-plug-useradm commit_validate is done
янв 22 21:54:29  clixon_backend[10919]: Getting users from the configuration...
янв 22 21:54:29  clixon_backend[10919]: 
                                               Username:          admin                                                                                                         
                                               Password Hashed:   7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC                                                                      
                                               Group:             administrator                                                                                                 
янв 22 21:54:29  clixon_backend[10919]: 
                                               Username:          oper                                                                                                          
                                               Password Hashed:   7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC                                                                      
                                               Group:             operator                                                                                                      
янв 22 21:54:29  clixon_backend[10919]: 
                                               Username:          admin                                                                                                         
                                               Password Hashed:   7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC                                                                      
                                               Group:             system-administrator                                                                                          
янв 22 21:54:29  clixon_backend[10919]: 
                                               Username:          sysadmin                                                                                                      
                                               Password Hashed:   123                                                                                                           
                                               Group:             system-administrator                                                                                          
янв 22 21:54:29  clixon_backend[10919]: Send data: {"body":"all","context":{"admin":{"password-hashed":"7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC","role":"system-administrator"},"oper":{"password-hashed":"7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC","role":"operator"},"sysadmin":{"password-hashed":"123","role":"system-administrator"}}}
янв 22 21:54:29  systemd[1]: Starting Super starter for python clixon_plug_useradm...
янв 22 21:54:29  run_super_py[10927]: Need to start script clixon_plug_useradm with json all for context {'admin': {'password-hashed': '7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC', 'role': 'system-administrator'}, 'oper': {'password-hashed': '7B8873D45A921B2057F3EA1EBB83BF2D5EFF57AC', 'role': 'operator'}, 'sysadmin': {'password-hashed': '123', 'role': 'system-administrator'}}
янв 22 21:54:29  systemd[1]: sudo_py@clixon_plug_useradm.service: Succeeded.
янв 22 21:54:29  systemd[1]: Finished Super starter for python clixon_plug_useradm.
янв 22 21:54:29  clixon_backend[10919]: Send data is done
янв 22 21:54:29  clixon_backend[10919]: clixon-plug-useradm commit_validate is done

In this example, I transfer what I received in the transaction to my python script, it doesn't matter, the question is that the commit works 2 times, what is it related to? tell me

@khromenokroman
Copy link
Author

khromenokroman commented Jan 31, 2024

#488 I have added more details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants