Skip to content

Continued changes for NNF fencing - #22

Merged
NateThornton merged 2 commits into
mainfrom
fencing
Jan 12, 2023
Merged

Continued changes for NNF fencing#22
NateThornton merged 2 commits into
mainfrom
fencing

Conversation

@NateThornton

Copy link
Copy Markdown
Contributor
  1. Updates the readme for

    • redfish (final and verified)
    • nnf (pending)
  2. Adds my in-progress fence_nnf.py changes

  3. Adds my notes.md file

Signed-off-by: Nate Thornton nate.thornton@hpe.com

Signed-off-by: Nate Thornton <nate.thornton@hpe.com>
Comment thread docs/guides/ha-cluster/readme.md Outdated
|`--systems-uri=[URI]` | The URI of the Systems object. Must be `/redfish/v1/Systems/Node0` |
|`--ssl-insecure` | Instructs the use of an insecure SSL exchange |
| `ip=[ADDRESS]` | The IP address or hostname of the HSS controller |
| `port=[PORT]` | The Port of the HSS controller. Must be `80` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this be port=80 then?

Comment thread docs/guides/ha-cluster/readme.md Outdated
| `ip=[ADDRESS]` | The IP address or hostname of the HSS controller |
| `port=[PORT]` | The Port of the HSS controller. Must be `80` |
| `systems-uri=[URI]` | The URI of the Systems object. Must be `/redfish/v1/Systems/Node0` |
| `ssl-insecure=[BOOL]` | Instructs the use of an insecure SSL exchange. Must be `true` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same for these two?

import logging
import atexit

sys.path.append("@FENCEAGENTSLIBDIR@")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we need a comment here. Does the user need to change this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry, should have made it more obvious in the PR. This is just a place to stuff my changes so I have a copy if my machine were to crash. The final place will be in the ClusterLabs repo (or a fork), in which case configure/make will handle the string substitution.

try:
from kubernetes import client
except ImportError:
logging.error("Couldn't import kubernetes.client - not found or not accessible")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why handle this one specifically?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because it has to be manually installed using pip

}

def main():
atexit.register(atexit_handler)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where is atexit_handler?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's in fencing.py

if e.status == 401:
fail(EC_LOGIN_DENIED)
elif e.status == 404:
fail(EC_STATUS)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could use http.HTTPStatus for these codes

Signed-off-by: Nate Thornton <nate.thornton@hpe.com>
@NateThornton
NateThornton merged commit 9011d13 into main Jan 12, 2023
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