)]}'
{"playbooks/roles/refstack/templates/refstack.vhost.j2":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"9e42b0c455eda341c7a812c9f9006be4e9236f75","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"  Redirect / https://{{ inventory_hostname }}/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":11,"id":"1fd0d53d_ca20f96d","line":11,"updated":"2021-03-02 19:42:18.000000000","message":"Thinking more on this, I don\u0027t think this is quite right, because it will redirect anyone who types in http:// to \"refstack01.openstack.org\" which isn\u0027t the name we want to expose.","commit_id":"ebc71e1d414203adcc94b1d4733ade0a9b10e8ef"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"fc1ae90c3c2e94be70a66d67032eb0f01fc490d4","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"  Redirect / https://{{ inventory_hostname }}/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":11,"id":"861e936d_257134f6","line":11,"in_reply_to":"1fd0d53d_ca20f96d","updated":"2021-03-02 19:59:39.000000000","message":"but it will be refstack01.openstack.org only when not running in production (that\u0027s when inventory_hostname is set to refstack01.openstack.org) .. anyway, I\u0027m fine with reverting this back to \u0027refstack.openstack.org\u0027 - I put the var there instead when I was stuck while debugging, this makes no difference in production","commit_id":"ebc71e1d414203adcc94b1d4733ade0a9b10e8ef"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"648fc8a763920ffbbc257b2f1bd40cb818aa4acf","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"  Redirect / https://{{ inventory_hostname }}/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":11,"id":"11f68fd4_3e6bc915","line":11,"in_reply_to":"2ae942b8_6147a9d2","updated":"2021-03-09 21:34:48.000000000","message":"we usually work around this by either submitting via https and ignoring certificates, or submitting something directly to the docker backend via http and avoiding apache (we have examples of both).\n\ni do think we should return this to just refstack.openstack.org to avoid pointing people at the wrong host in production.","commit_id":"ebc71e1d414203adcc94b1d4733ade0a9b10e8ef"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"56b3b0cbbdd05fafe66256552a2833883800a9b7","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"  Redirect / https://{{ inventory_hostname }}/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":11,"id":"2ae942b8_6147a9d2","line":11,"in_reply_to":"861e936d_257134f6","updated":"2021-03-05 10:00:42.000000000","message":"as the last patchsets show, this has to be here because the result submission test contacts the server via http protocol, without this the test will be redirected to the production instance where the anonymous upload is disabled which results in 401 Unauthorized.","commit_id":"ebc71e1d414203adcc94b1d4733ade0a9b10e8ef"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"fc1ae90c3c2e94be70a66d67032eb0f01fc490d4","unresolved":true,"context_lines":[{"line_number":41,"context_line":"  ProxyPassReverse / http://localhost:8000/"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"  \u003cLocation \"/api/\"\u003e"},{"line_number":44,"context_line":"    ProxyPass \"http://localhost:8000/\""},{"line_number":45,"context_line":"  \u003c/Location\u003e"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"  \u003cLocation \"/robots.txt\"\u003e"}],"source_content_type":"text/x-jinja2","patch_set":11,"id":"fdb891c3_63d2ba2e","line":44,"updated":"2021-03-02 19:59:39.000000000","message":"this is definitely a workaround, I\u0027m aware of that, but it was the only way I could figure out how to have the \u0027/api/\u0027 part in the URL (when submitting data for example).\n\nIf I understood the discussion on the meeting correctly, the server was deployed with wsgi before where this setting was present:\nWSGIScriptAlias /api /etc/refstack/app.wsgi\n\nDoes it mean that before the \u0027/api/\u0027 part of the URL was made by a web server magic (a setting outside of refstack scope)? If yes, what do we do now? My only goal is not to change the endpoint - so if there was \u0027/api/\u0027 in a URL before, I need to have it there now and the way how is not that relevant, either wsgi setting as before, this workaround or anything else\n\nAny ideas?","commit_id":"ebc71e1d414203adcc94b1d4733ade0a9b10e8ef"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"1725ddfda7a331f3c1833c201f6379295e0a38b8","unresolved":true,"context_lines":[{"line_number":41,"context_line":"  ProxyPassReverse / http://localhost:8000/"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"  \u003cLocation \"/api/\"\u003e"},{"line_number":44,"context_line":"    ProxyPass \"http://localhost:8000/\""},{"line_number":45,"context_line":"  \u003c/Location\u003e"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"  \u003cLocation \"/robots.txt\"\u003e"}],"source_content_type":"text/x-jinja2","patch_set":11,"id":"09f74bdf_04d574b9","line":44,"in_reply_to":"bc5f25bb_d3f694ab","updated":"2021-03-04 23:57:32.000000000","message":"The wsgi app seems did the same what \u0027pecan serve\u0027 does now. Before all /api requests were redirected to the wsgi app which executed refstack to handle the request. I would say that the other resources (pages like homepage, about, etc) were served by apache itself - an index.html could have linked the .js files from refstack-ui/app/. Now \u0027pecan serve\u0027 is able to serve everything so no index.html linking .js files is required (just a simple ProxyPass redirection) - which however resulted in a slight change of the URLs.\nI don\u0027t have access to the refstack.openstack.org to dig even further but this would make sense.\nAnyway, I don\u0027t have any other solution and I don\u0027t have time to rewrite refstack atm, I\u0027ve already spent much more time on this than I expected. \nI\u0027m gonna make a huge comment in the vhost template so that the weird redirection makes sense to anyone who looks at the config.","commit_id":"ebc71e1d414203adcc94b1d4733ade0a9b10e8ef"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"9dbc924adb9043baed4141c09dfacb21477ccf61","unresolved":true,"context_lines":[{"line_number":41,"context_line":"  ProxyPassReverse / http://localhost:8000/"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"  \u003cLocation \"/api/\"\u003e"},{"line_number":44,"context_line":"    ProxyPass \"http://localhost:8000/\""},{"line_number":45,"context_line":"  \u003c/Location\u003e"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"  \u003cLocation \"/robots.txt\"\u003e"}],"source_content_type":"text/x-jinja2","patch_set":11,"id":"bc5f25bb_d3f694ab","line":44,"in_reply_to":"fdb891c3_63d2ba2e","updated":"2021-03-04 05:32:15.000000000","message":"Not really sorry.  It does appear that the old site directed /api directly to app.wsgi, but I\u0027m still unclear how it served all the other resources.  in fact i\u0027m not really sure how this new container serves the resources, it seems to run under pecan now?\n\na priori, it doesn\u0027t really seem right to send REST requests for /api/foo to /foo ... at the very least a comment here that explains this would be pretty helpful for the next \"lucky\" person to look at it ...","commit_id":"ebc71e1d414203adcc94b1d4733ade0a9b10e8ef"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"d3a087134e809316f67a467d96d98a8523aab204","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"  Redirect / https://{{ inventory_hostname }}/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":13,"id":"b9d19c3f_da374d89","line":11,"range":{"start_line":11,"start_character":20,"end_line":11,"end_character":45},"updated":"2021-03-09 19:31:41.000000000","message":"Note this will break http -\u003e https redirects when we update DNS to serve at refstack.openstack.org. I think we should leave this alone. You can test things by editing /etc/hosts and putting in an entry for refstack.openstack.org until we update DNS.","commit_id":"1b1d19258e1a79bda155431d3e27bed67efecbf0"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"648fc8a763920ffbbc257b2f1bd40cb818aa4acf","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"  Redirect / https://{{ inventory_hostname }}/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":13,"id":"4cc4c6a6_e6c20641","line":11,"range":{"start_line":11,"start_character":20,"end_line":11,"end_character":45},"in_reply_to":"39fefaa4_c590455c","updated":"2021-03-09 21:34:48.000000000","message":"\u003e in production it\u0027s set to \u0027refstack.openstack.org\u0027, isn\u0027t it?\n\nno, it will be refstack01.openstack.org -- we do this to have CNAME\u0027s that don\u0027t move and the ability to switch out servers underneath, in general.","commit_id":"1b1d19258e1a79bda155431d3e27bed67efecbf0"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"ce924c24baa2a4ce4f7248e5729994b764e2d29b","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"  Redirect / https://{{ inventory_hostname }}/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":13,"id":"fdd6f85e_7e23bc33","line":11,"range":{"start_line":11,"start_character":20,"end_line":11,"end_character":45},"in_reply_to":"b9d19c3f_da374d89","updated":"2021-03-09 19:36:54.000000000","message":"if this is not here, then the test (test_result_submission) fails - see the previous patch set - because for some reason the request made in the test is via http, which means this redirect redirects it to the real server (if inventory_hostname is not used here) and the real server will make the test fail as it doesn\u0027t accept anonymous submissions (plus it\u0027s also bad to leave a test make any interaction with the production server and the production DB)","commit_id":"1b1d19258e1a79bda155431d3e27bed67efecbf0"},{"author":{"_account_id":22873,"name":"Martin Kopec","email":"mkopec@redhat.com","username":"mkopec"},"change_message_id":"f2be4ca65e05ac3d91c05bd394e15ecdf1406277","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"  CustomLog ${APACHE_LOG_DIR}/refstack-access.log combined"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"  Redirect / https://{{ inventory_hostname }}/"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"\u003c/VirtualHost\u003e"},{"line_number":14,"context_line":""}],"source_content_type":"text/x-jinja2","patch_set":13,"id":"39fefaa4_c590455c","line":11,"range":{"start_line":11,"start_character":20,"end_line":11,"end_character":45},"in_reply_to":"fdd6f85e_7e23bc33","updated":"2021-03-09 19:38:57.000000000","message":"I don\u0027t understand how this can break the http-\u003ehttps redirect, the inventory_hostname is used several times in this vhost config and in production it\u0027s set to \u0027refstack.openstack.org\u0027, isn\u0027t it?","commit_id":"1b1d19258e1a79bda155431d3e27bed67efecbf0"}],"testinfra/test_refstack.py":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"2202acfe05220777fe599ca281dc0d0be13ac13e","unresolved":true,"context_lines":[{"line_number":17,"context_line":"import urllib3"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"testinfra_hosts \u003d [\u0027refstack01.openstack.org:8000\u0027]"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"test_result_json \u003d {"},{"line_number":23,"context_line":"    \"cpid\": \"9cddf99456964d7c90b98362e7175a12\","}],"source_content_type":"text/x-python","patch_set":1,"id":"46db3397_6b39ad93","line":20,"range":{"start_line":20,"start_character":19,"end_line":20,"end_character":50},"updated":"2021-02-18 00:36:02.000000000","message":"doh, this should just be refstack01.openstack.org ... let\u0027s fix that 😊","commit_id":"da7e53d29c6cfcf1cf73decbbd71ad1c558bd0bd"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"a4ff62b3e34ba3196048dc4a10cc63fd1ef8a2cc","unresolved":true,"context_lines":[{"line_number":17,"context_line":"import urllib3"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"testinfra_hosts \u003d [\u0027localhost:8000\u0027]"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"test_result_json \u003d {"},{"line_number":23,"context_line":"    \"cpid\": \"9cddf99456964d7c90b98362e7175a12\","}],"source_content_type":"text/x-python","patch_set":15,"id":"be04d06f_9e2bc341","line":20,"updated":"2021-03-09 23:53:28.000000000","message":"we\u0027re still skipping this.  it should just be the hostname from the inventory","commit_id":"3700bf586b6e2a02cbe7f0cd3b8c3e8ddba6cf86"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"84a70bcaec40efa873d3ef021932630dd02dc31f","unresolved":true,"context_lines":[{"line_number":50,"context_line":"    assert out[0][\"RestartCount\"] \u003d\u003d 0"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def test_refstack_result_submission(host):"},{"line_number":53,"context_line":"    url \u003d \"https://localhost:443/v1/results/\""},{"line_number":54,"context_line":"    headers \u003d {\u0027Content-type\u0027: \u0027application/json\u0027}"},{"line_number":55,"context_line":"    data \u003d json.dumps(test_result_json)"},{"line_number":56,"context_line":"    http \u003d urllib3.PoolManager(cert_reqs\u003d\u0027CERT_NONE\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"94ac873c_cb851eca","line":53,"updated":"2021-03-10 03:07:28.000000000","message":"oh, unlike curl that runs on the remote host, this is running on bridge...","commit_id":"ee8542430991e86781651ec408e681631453f537"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"d1cff0a6e6e800f2cb66ca5b3eb2c09fc03374f9","unresolved":true,"context_lines":[{"line_number":50,"context_line":"    assert out[0][\"RestartCount\"] \u003d\u003d 0"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def test_refstack_result_submission(host):"},{"line_number":53,"context_line":"    url \u003d \"https://refstack01.openstack.org/v1/results/\""},{"line_number":54,"context_line":"    headers \u003d {\u0027Content-type\u0027: \u0027application/json\u0027}"},{"line_number":55,"context_line":"    data \u003d json.dumps(test_result_json)"},{"line_number":56,"context_line":"    http \u003d urllib3.PoolManager(cert_reqs\u003d\u0027CERT_NONE\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"d44c7e8a_c9c201ba","line":53,"updated":"2021-03-10 15:23:33.000000000","message":"We should double check this talks to the test node and not the actual node. I believe that we configure /etc/hosts properly in the test environment and this works as we want it to, but double checking is a good idea.","commit_id":"834e39fc7e66c3c9973a1a44c13580e935bba40b"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"d61cf4dd2f1262167ff4d3c98cbdf797622f4efe","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    assert out[0][\"RestartCount\"] \u003d\u003d 0"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"def test_refstack_result_submission(host):"},{"line_number":53,"context_line":"    url \u003d \"https://refstack01.openstack.org/v1/results/\""},{"line_number":54,"context_line":"    headers \u003d {\u0027Content-type\u0027: \u0027application/json\u0027}"},{"line_number":55,"context_line":"    data \u003d json.dumps(test_result_json)"},{"line_number":56,"context_line":"    http \u003d urllib3.PoolManager(cert_reqs\u003d\u0027CERT_NONE\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"98631720_553ad5f4","line":53,"in_reply_to":"d44c7e8a_c9c201ba","updated":"2021-03-11 02:59:24.000000000","message":"That was why I added the apache log collection 😊  We can see it hitting the endpoint there\n\nhttps://zuul.opendev.org/t/openstack/build/c094e0fa463e489cb3f8c75669aa23e3/log/refstack01.openstack.org/apache2/refstack-ssl-access.log","commit_id":"834e39fc7e66c3c9973a1a44c13580e935bba40b"}]}
