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

Fix daemon and python 3.7 issues v2 #151

Conversation

gonzoleeman
Copy link
Contributor

I believe this pull request fixes all issues raised in the first version:

  • removed reference to not-yet-present targetcli.service file
  • moved "to.sock = sock" earlier
  • combined 2 sets of 2 commits that were related
  • cleaned up some merge errors of my own that I found

The indentation was wrong, causing the daemon to only
process the last block of outout, which would only
show up with a lot of output.
We can no longer have python automatically convert
binary to/from string data, so be explicit about it.

Also, the TargetCLI __del__ method was testing for a
non-existant attribute, so close our socket if open.
Add Documentation entries, cleaned up socket activation entries.
There's no need to return a zero-length string.
Before being fixed, this caused a hang when shutting down.
Save the error exit for unknown exits. This makes
systemd happier, since it stops us with a signal.
This allows the main loop to get an exception in its wait loop
when a signal arrives, rather than block forever. Before this,
topping the daemon required sending a KILL signal or sending one last
command, so that the loop could check the "received a signal" flag.
Regular socket communications are fallen back to when
no systemd socket is present.
Before, we would get a "Bad File Descriptor" message when
a signal causes closure of the socket while waiting on a
socket message.
Copy link
Contributor

@pkalever pkalever left a comment

Choose a reason for hiding this comment

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

Leaving very minor findings below.
Tested it on fedora 30, it works well for me.

Overall the PR looks good to me.

Thanks @gonzoleeman

@gonzoleeman
Copy link
Contributor Author

Would you like me to fix the spelling errors in an additional commit?

@pkalever
Copy link
Contributor

Would you like me to fix the spelling errors in an additional commit?

This is not important, for projects which I maintain, I generally fix it while merging, avoiding the need to respin for the author/contributor :-)

Or

IMHO, we can fix it later when we come across that part of code in our future PR's.

Thanks!

@maurizio-lombardi
Copy link
Collaborator

Looks good to me, thanks @gonzoleeman

@maurizio-lombardi maurizio-lombardi merged commit 6e3146f into open-iscsi:master Oct 15, 2019
@gonzoleeman gonzoleeman deleted the fix-daemon-and-python-3.7-issues-v2 branch February 18, 2020 16:14
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.

3 participants