)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"0c5706128f29f88a454f5826cf5d4fef0abc39d0","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"write one resolv config"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"On some fresh systemd systems /etc/resolv.conf is a symlink pointing to"},{"line_number":10,"context_line":"    ../run/systemd/resolve/stub-resolv.conf"},{"line_number":11,"context_line":"This target file does not exist before systemd-resolved is run so glean"},{"line_number":12,"context_line":"fails with"},{"line_number":13,"context_line":"    \u0027FileNotFoundError: [Errno 2] No such file or directory: \u0027/etc/resolv.conf\u0027"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"non-systemd-resolved systems need /etc/resolv.conf managed as a file,"},{"line_number":16,"context_line":"systemd systems need /etc/systemd/resolved.conf managed as a file."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"df33271e_037813f6","line":13,"range":{"start_line":9,"start_character":0,"end_line":13,"end_character":79},"updated":"2020-04-07 03:56:50.000000000","message":"I feel like we\u0027ve been here before ...\n\nWhere is this filenotfounderror actually coming from?\n\n[1] was put in to write over the symlink to nowhere.  that tracks back to [2] and involved bug [3]\n\nIIRC the problem was systemd would start and put this symlink in, and NetworkManager/dhclient/etc would then not put nameservers in there.\n\nPresumably gentoo is *not* writing out a /etc/resolv.conf, and this is the same thing as described in that old bug?\n\nI\u0027m pretty sure that Rackspace is the only place that does *not* configure this from dhcp; i.e. glean has to write it out from configdrive data.\n\nI feel like this is re-introducing the original bug; if there\u0027s no /etc/resolv.conf there, systemd creates a broken symlink, with this change glean will not write out the /etc/resolv.conf file, and NetworkManager/dhclient will break?  \n\n[1] https://opendev.org/opendev/glean/src/branch/master/glean/cmd.py#L1095\n[2] https://review.opendev.org/#/c/257173/\n[3] https://bugzilla.redhat.com/show_bug.cgi?id\u003d1197204","commit_id":"7f7f86eb5e6e5b948cc1e7866f7cede08067130a"},{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"d75293ef170e31eb894c993b7512d014f30b896f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    ../run/systemd/resolve/stub-resolv.conf"},{"line_number":11,"context_line":"This target file does not exist before systemd-resolved is run so glean"},{"line_number":12,"context_line":"fails with"},{"line_number":13,"context_line":"    \u0027FileNotFoundError: [Errno 2] No such file or directory: \u0027/etc/resolv.conf\u0027"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"non-systemd-resolved systems need /etc/resolv.conf managed as a file,"},{"line_number":16,"context_line":"systemd systems need /etc/systemd/resolved.conf managed as a file."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"df33271e_1e0d0a37","line":13,"updated":"2020-04-07 04:25:35.000000000","message":"Right now...\n1. glean tries to write a file to /etc/resolv.conf\n2. /etc/resolv.conf is a symlink to /run/systemd/resolve/stub-resolv.conf\n3. /run/systemd/resolve/stub-resolv.conf does not exist because glean runs before systemd-resolved starts\n4. glean fails to write to a file that does not exist\n\nThe behavior is because the python file writing doesn\u0027t seem to like writing to dangling symlinks (or more likely the direcory the symlink file points to doesn\u0027t even exist yet.\n\nThe goal is to run a pure systemd/networkd/resolved system without dhclient/networkmanager/etc.  currently that is not possible\n\nCorrect, gentoo stage3 does not provide /etc/resolv.conf.  The instruction in our manual says to copy it from the installer system into the chroot.  since that\u0027s not really possible via dib, glean needs to manage the file, which is fine if it exists...\n\n/me doesn\u0027t work for rackspace anymore :P\n\ncorrect, if the file does not exist it won\u0027t write to it, maybe I should wrap the path.exists in a is_symlink?","commit_id":"7f7f86eb5e6e5b948cc1e7866f7cede08067130a"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"3a9e6154ab5675e8fd05760e9d234b0df15c8c6b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    ../run/systemd/resolve/stub-resolv.conf"},{"line_number":11,"context_line":"This target file does not exist before systemd-resolved is run so glean"},{"line_number":12,"context_line":"fails with"},{"line_number":13,"context_line":"    \u0027FileNotFoundError: [Errno 2] No such file or directory: \u0027/etc/resolv.conf\u0027"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"non-systemd-resolved systems need /etc/resolv.conf managed as a file,"},{"line_number":16,"context_line":"systemd systems need /etc/systemd/resolved.conf managed as a file."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"df33271e_befcde3e","line":13,"in_reply_to":"df33271e_1e0d0a37","updated":"2020-04-07 05:14:40.000000000","message":"\u003e 4. glean fails to write to a file that does not exist\n\nSo that should be exactly what [1] tries to fix up.  Can we first determine why that hasn\u0027t worked?\n\n---\n\nperhaps we should assume\n\n1) dangling /etc/resolv.conf symlink \u003d\u003d systemd-resolved system; we should copy any configdrive nameserver data into /etc/systemd/resolved.conf, and /etc/resolv.conf will come online later?\n\n2) ergo, a non-systemd-resolved image *must* provide a stub /etc/resolv.conf in the image?  if the image doesn\u0027t, well then systemd is going to create the link for you, see 1), and there\u0027s not much glean can do about it (it can\u0027t tell the difference between you wanting systemd to do that and it doing it by accident?)\n\nIn that case, we should also drop [1]?\n\n[1] https://opendev.org/opendev/glean/src/branch/master/glean/cmd.py#L1095","commit_id":"7f7f86eb5e6e5b948cc1e7866f7cede08067130a"}],"glean/cmd.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"1ffb6623a77a40c4fa11fe38c1e2876a2dc85a0e","unresolved":false,"context_lines":[{"line_number":949,"context_line":"    resolv_nameservers \u003d \"\""},{"line_number":950,"context_line":"    for server in dns_servers:"},{"line_number":951,"context_line":"        resolv_nameservers +\u003d \"nameserver {0}\\n\".format(server)"},{"line_number":952,"context_line":"    # write resolv.conf if the file can be written to (if symlink is pointing to"},{"line_number":953,"context_line":"    # a non-existant file, writing will fail), will return false if the pointer"},{"line_number":954,"context_line":"    # is incomplete"},{"line_number":955,"context_line":"    if os.path.exists(\u0027/etc/resolv.conf\u0027):"}],"source_content_type":"text/x-python","patch_set":4,"id":"df33271e_e36721ea","line":952,"updated":"2020-04-03 19:57:31.000000000","message":"pep8: E501 line too long (80 \u003e 79 characters)","commit_id":"65127a5873b4a72c2aa15886f91e11e25df8c0ab"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"0c5706128f29f88a454f5826cf5d4fef0abc39d0","unresolved":false,"context_lines":[{"line_number":955,"context_line":"    if os.path.exists(\u0027/etc/resolv.conf\u0027):"},{"line_number":956,"context_line":"        resolve_confs[\u0027/etc/resolv.conf\u0027] \u003d resolv_nameservers"},{"line_number":957,"context_line":"    # set up resolved if available"},{"line_number":958,"context_line":"    if os.path.isfile(\u0027/etc/systemd/resolved.conf\u0027):"},{"line_number":959,"context_line":"        # read the existing config  so we only overwrite what\u0027s needed"},{"line_number":960,"context_line":"        resolved_conf \u003d configparser.ConfigParser()"},{"line_number":961,"context_line":"        resolved_conf.read(\u0027/etc/systemd/resolved.conf\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_e3652f47","line":958,"updated":"2020-04-07 03:56:50.000000000","message":"so i guess this works *if* you have /etc/systemd/resolved.conf and things get configured here.\n\nBut the original problem was for systems *without* this; now we would not write out configdrive nameserver configuration into /etc/resolv.conf for them anywhere?","commit_id":"7f7f86eb5e6e5b948cc1e7866f7cede08067130a"},{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"02ee41c662d0804993feca4fb423e6fe9c1dd72b","unresolved":false,"context_lines":[{"line_number":953,"context_line":"    # write resolv.conf if the file can be written to (if symlink is pointing"},{"line_number":954,"context_line":"    # to a non-existant file, writing will fail), will return false if the"},{"line_number":955,"context_line":"    # pointer is incomplete"},{"line_number":956,"context_line":"    log.debug(resolved_enabled)"},{"line_number":957,"context_line":"    if resolved_enabled !\u003d 0:"},{"line_number":958,"context_line":"        log.debug(\"resolved not in use, writing to /etc/resolv.conf\")"},{"line_number":959,"context_line":"        resolv_nameservers \u003d \"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_e057cf01","line":956,"updated":"2020-04-16 03:40:57.000000000","message":"looks like I missed a debug","commit_id":"d43e9d4c8af43ee7f40596264a933b02c8014913"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"de231334225e100ab2507a31f7c89079a47a35e1","unresolved":false,"context_lines":[{"line_number":953,"context_line":"    # write resolv.conf if the file can be written to (if symlink is pointing"},{"line_number":954,"context_line":"    # to a non-existant file, writing will fail), will return false if the"},{"line_number":955,"context_line":"    # pointer is incomplete"},{"line_number":956,"context_line":"    log.debug(resolved_enabled)"},{"line_number":957,"context_line":"    if resolved_enabled !\u003d 0:"},{"line_number":958,"context_line":"        log.debug(\"resolved not in use, writing to /etc/resolv.conf\")"},{"line_number":959,"context_line":"        resolv_nameservers \u003d \"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_a51af979","line":956,"updated":"2020-04-16 03:25:43.000000000","message":"remove this one as it\u0027s covered by the statements below","commit_id":"d43e9d4c8af43ee7f40596264a933b02c8014913"},{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"02ee41c662d0804993feca4fb423e6fe9c1dd72b","unresolved":false,"context_lines":[{"line_number":961,"context_line":"            resolv_nameservers +\u003d \"nameserver {0}\\n\".format(server)"},{"line_number":962,"context_line":"        resolve_confs[\u0027/etc/resolv.conf\u0027] \u003d resolv_nameservers"},{"line_number":963,"context_line":"    # set up resolved if enabled"},{"line_number":964,"context_line":"    if resolved_enabled is True:"},{"line_number":965,"context_line":"        log.debug(\"resolved in use, writing to /etc/systemd/resolved.conf\")"},{"line_number":966,"context_line":"        # read the existing config  so we only overwrite what\u0027s needed"},{"line_number":967,"context_line":"        resolved_conf \u003d configparser.ConfigParser()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_c05a9328","line":964,"updated":"2020-04-16 03:40:57.000000000","message":"Ya, this one is odd, if I set \u003d\u003d 0 or is 0 it fails.","commit_id":"d43e9d4c8af43ee7f40596264a933b02c8014913"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"de231334225e100ab2507a31f7c89079a47a35e1","unresolved":false,"context_lines":[{"line_number":961,"context_line":"            resolv_nameservers +\u003d \"nameserver {0}\\n\".format(server)"},{"line_number":962,"context_line":"        resolve_confs[\u0027/etc/resolv.conf\u0027] \u003d resolv_nameservers"},{"line_number":963,"context_line":"    # set up resolved if enabled"},{"line_number":964,"context_line":"    if resolved_enabled is True:"},{"line_number":965,"context_line":"        log.debug(\"resolved in use, writing to /etc/systemd/resolved.conf\")"},{"line_number":966,"context_line":"        # read the existing config  so we only overwrite what\u0027s needed"},{"line_number":967,"context_line":"        resolved_conf \u003d configparser.ConfigParser()"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_e5140151","line":964,"updated":"2020-04-16 03:25:43.000000000","message":"it\u0027s weird to !\u003d 0 then compare this to True; i feel like choose if it\u0027s a bool or an int","commit_id":"d43e9d4c8af43ee7f40596264a933b02c8014913"},{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"02ee41c662d0804993feca4fb423e6fe9c1dd72b","unresolved":false,"context_lines":[{"line_number":965,"context_line":"        log.debug(\"resolved in use, writing to /etc/systemd/resolved.conf\")"},{"line_number":966,"context_line":"        # read the existing config  so we only overwrite what\u0027s needed"},{"line_number":967,"context_line":"        resolved_conf \u003d configparser.ConfigParser()"},{"line_number":968,"context_line":"        resolved_conf.optionxform \u003d str"},{"line_number":969,"context_line":"        resolved_conf.read(\u0027/etc/systemd/resolved.conf\u0027)"},{"line_number":970,"context_line":"        # create config section if not created"},{"line_number":971,"context_line":"        if not resolved_conf.has_section(\u0027Resolve\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_2041b73a","line":968,"updated":"2020-04-16 03:40:57.000000000","message":"resolvconf will write a lowercase option for DNS if this is not set.","commit_id":"d43e9d4c8af43ee7f40596264a933b02c8014913"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"7ab87c2dc9e1ed9f460f5f8716d241801030a815","unresolved":false,"context_lines":[{"line_number":965,"context_line":"        log.debug(\"resolved in use, writing to /etc/systemd/resolved.conf\")"},{"line_number":966,"context_line":"        # read the existing config  so we only overwrite what\u0027s needed"},{"line_number":967,"context_line":"        resolved_conf \u003d configparser.ConfigParser()"},{"line_number":968,"context_line":"        resolved_conf.optionxform \u003d str"},{"line_number":969,"context_line":"        resolved_conf.read(\u0027/etc/systemd/resolved.conf\u0027)"},{"line_number":970,"context_line":"        # create config section if not created"},{"line_number":971,"context_line":"        if not resolved_conf.has_section(\u0027Resolve\u0027):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4c43b2_a0ff87ff","line":968,"updated":"2020-04-16 03:28:39.000000000","message":"what\u0027s this bit?","commit_id":"d43e9d4c8af43ee7f40596264a933b02c8014913"}]}
