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

Remove HTTP fallback #2355

Merged
merged 15 commits into from
Jul 25, 2017
Merged

Remove HTTP fallback #2355

merged 15 commits into from
Jul 25, 2017

Conversation

dvalters
Copy link
Contributor

@dvalters dvalters commented Jul 10, 2017

To close #2204:

  • Fails if HTTPS configured but only HTTP available (no SSL)
  • Communication protocol is stored in suite contact file, can also be set in the users global config file.
  • Default setting is https (same as current behaviour), http must be explicitly configured.

e.g. in global.rc

# Optional, defaults to attempting HTTPS if not set. 
[communication]
    method=http

@dvalters dvalters self-assigned this Jul 10, 2017
@matthewrmshin matthewrmshin added this to the next release milestone Jul 10, 2017
fi
set +x

set +e
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will change this to a symlink instead of a copy of test header.

@@ -19,5 +19,5 @@

from cylc.network.method import METHOD

if METHOD == "https":
if METHOD == "https" or "http":
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be if METHOD == "https" or METHOD == "http": or if METHOD in ["https", "http"]:

@matthewrmshin
Copy link
Contributor

(As discussed offline, please be aware that cylc.task_message loads the contact file before calling the HTTPS client, so it may be worth making a small modification so that the contact file only gets loaded once.)

@matthewrmshin
Copy link
Contributor

(Site test battery OK in my environment.)

@matthewrmshin
Copy link
Contributor

(Profile battery 😐 neutral in my environment, as expected.)

Copy link
Contributor

@matthewrmshin matthewrmshin left a comment

Choose a reason for hiding this comment

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

Now looking good.

@@ -38,6 +39,11 @@
" falling back to HTTP: {0}\n"
)

ERROR_NO_HTTPS_SUPPORT = (
"ERROR: server has no HTTPS support," +
" configure user's global.rc file to use HTTPS : {0}\n"
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't that be "to use HTTP" (no S!).

Better wording might be "configure your global.rc file to use HTTP" (as the the person receiving this warning will be the user in question).

return comms_prtcl
except (AttributeError, KeyError, TypeError, ValueError):
raise KeyError("No suite contact info for comms protocol found")

Copy link
Member

Choose a reason for hiding this comment

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

Do we need to be worried about back-compatibility here, for already-running suites?

Copy link
Contributor Author

@dvalters dvalters Jul 20, 2017

Choose a reason for hiding this comment

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

It will fall back to finding it from the global.rc file if not in the contact file here, which already has a default setting of https in previous versions. But yes, what if the old running suite is using http...I will have to think about how to handle this...

(Already-running suites using https should be ok with this)

Copy link
Member

Choose a reason for hiding this comment

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

OK, roger that.

http_request_items)
sys.stderr.write(ERROR_NO_HTTPS_SUPPORT.format(exc))
raise CylcError("Cannot issue a https command"
" over unsecured http.")
Copy link
Member

Choose a reason for hiding this comment

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

It's not really an "https command". Maybe just "Cannot issue commands over unsecured http"?

http_request_items)
sys.stderr.write(ERROR_NO_HTTPS_SUPPORT.format(exc))
raise CylcError("Cannot issue a https command"
" over unsecured http.")
Copy link
Member

Choose a reason for hiding this comment

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

ditto

Copy link
Member

@hjoliver hjoliver left a comment

Choose a reason for hiding this comment

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

All good now.

@hjoliver hjoliver merged commit 9b7d344 into cylc:master Jul 25, 2017
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.

Remove auto-fallback to HTTP comms.
3 participants