Merged
Conversation
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
now basic execution flow is tested, tgt rest api target create is getting called. Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
target_create, lun_create testing pending, ha-lib issue Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
added 3 commits
April 6, 2018 02:38
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
This is now achieved by using json_auto_t type, which dereferences the object at end of scope. Thanks to Sumit Kapoor, for informing me about this. Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
sumitkapoor
approved these changes
Apr 6, 2018
Removed unnecessary logs. Signed-off-by: Rohan Puri <rohan.puri@primaryio.com>
prasad-joshi
reviewed
Apr 6, 2018
| } | ||
|
|
||
| memset(cmd, 0, sizeof(cmd)); | ||
| snprintf(cmd, sizeof(cmd), "tgtadm --lld iscsi --mode target --op new" |
There was a problem hiding this comment.
You might want to check return value of snprintf. If thing u wanted in string wrapped.
| } | ||
|
|
||
| memset(cmd, 0, sizeof(cmd)); | ||
| snprintf(cmd, sizeof(cmd), "tgtadm --lld iscsi --mode logicalunit --op new" |
| { | ||
| struct _ha_instance *hap = (struct _ha_instance *) userp; | ||
|
|
||
| pthread_create(&ha_hb_tid, NULL, &ha_heartbeat, (void *)hap); |
There was a problem hiding this comment.
Check return value. What if thread didn't start?
There was a problem hiding this comment.
What happens when this can is called multiple times?
Author
There was a problem hiding this comment.
return value checked, if failed, we return error. handled multiple times occurence too.
| return HA_CALLBACK_CONTINUE; | ||
| } | ||
|
|
||
| int tgt_ha_stop_cb(const _ha_request *reqp, |
There was a problem hiding this comment.
What happens when this cb is called multiple times
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.