From 53d5da9a56c5d8a05033a5c02438f5732cfed4d0 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Thu, 28 Sep 2023 21:03:10 +0100 Subject: [PATCH] feat: postmortem on why users were not able to signup yesterday. --- .md.toml | 2 +- src/images/backgroundsharkycoin.png | 3 + src/images/favicon/favicon-16x16.png | 3 + src/images/sharky.svg | 193 +++++++++++++++++++ src/postmortem/2023-09-27_Signup-failures.md | 86 +++++++++ src/templates/general.html | 27 +++ src/templates/index.css | 87 +++++++++ src/templates/powerpoint.html | 4 +- 8 files changed, 402 insertions(+), 3 deletions(-) create mode 100644 src/images/backgroundsharkycoin.png create mode 100644 src/images/favicon/favicon-16x16.png create mode 100644 src/images/sharky.svg create mode 100644 src/postmortem/2023-09-27_Signup-failures.md create mode 100644 src/templates/general.html create mode 100644 src/templates/index.css diff --git a/.md.toml b/.md.toml index d174ccb..29f9392 100644 --- a/.md.toml +++ b/.md.toml @@ -26,7 +26,7 @@ html_void = [] enable = true # Set a base template # Optional -#general = "./src/template.html" +general = "./src/templates/general.html" powerpoint = "./src/templates/powerpoint.html" # Priority of the templates to use, first one to match a markdown file is used. diff --git a/src/images/backgroundsharkycoin.png b/src/images/backgroundsharkycoin.png new file mode 100644 index 0000000..48a2362 --- /dev/null +++ b/src/images/backgroundsharkycoin.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6aa92476b2064576b1db1a13f14e4cef1016010e4c9f4d9af62a67ba9af76300 +size 41493 diff --git a/src/images/favicon/favicon-16x16.png b/src/images/favicon/favicon-16x16.png new file mode 100644 index 0000000..da9b786 --- /dev/null +++ b/src/images/favicon/favicon-16x16.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9500c2b745f88b34413fa9b40e5ea2e12998f10b57e7d2721991afeac4bcb6e6 +size 1544 diff --git a/src/images/sharky.svg b/src/images/sharky.svg new file mode 100644 index 0000000..c864050 --- /dev/null +++ b/src/images/sharky.svg @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/postmortem/2023-09-27_Signup-failures.md b/src/postmortem/2023-09-27_Signup-failures.md new file mode 100644 index 0000000..04d678a --- /dev/null +++ b/src/postmortem/2023-09-27_Signup-failures.md @@ -0,0 +1,86 @@ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +title = '2023-09-27 Signup Failures Postmortem' +date = 2023-09-28 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +# 2023-09-27 Signup Failures Postmortem + +Key people: Brendan (silver). + +## What happened +During the signup event for Skynet new users hit a snag in that they werent receiving emails. +These emails are used to verify that they own the address that is on wolves. +This allows us to link the accounts together. + +## What was done during outage + +First action was to try and remote into the impacted server (``kitt.skynet.ie``) and see what was teh status of the data update command. +This was hampered by ``ssh: could not resolve hostname kitt.skynet.ie: Name or service not known``. +I tried to remote into ``vendetta.skynet.ie`` (ns1) and got the same error. + +Next action wast to go into the server room and reboot the vendetta to see if we could get teh hostname issue fixed. +Restarted, it came up, went back into Room 3. + +Same issue, though now I was certain teh DNS was working. +My laptop had decided to disconnect from eduroam and refused to reconnect. +Rebooted it, took quite a while since it was trying to mount a network drive that was not accessible, +not a great way to spend 1:30 under time pressure. +When it booted up it connected to eduroam without issues. + +I was able to sftp into the server and pull the database file. +Confirmed that the csv import was failing, even on a freshly generated database (sqlite databases can be regenerated easily). +I tried to rebuild it locally, but my dev environment on my laptop was not set up correctly which hampered my efforts. + +Soon enough cut losses and continued on with the remainder of the presentation. +Although without the interactive elements that were planned. + +## What was the root cause + +At home with my normal dev env I was abale to properly investigate. +The issue was a database schema I had planned to use as an interim one between teh current method of using the CSV export and the future of using Wolves API. + +The plan was to have fields for ``id_member`` which changes yearly (csv) and ``id_wolves`` which would identify the user (does not change). +In combining the two lead to insertion errors leading to no rows being added or updated. + +Table schema as it was during teh signup event. +```sql +CREATE TABLE IF NOT EXISTS accounts_wolves ( + id_wolves text DEFAULT '', + id_member text DEFAULT '', + id_student text, + email text not null, + expiry text not null, + name_first text, + name_second text, + PRIMARY KEY (id_wolves, id_member) +) +``` + +## What was the solution +The main solution was to simplify so only one primary col. +Like so: + +```sql +CREATE TABLE IF NOT EXISTS accounts_wolves ( + id_wolves text PRIMARY KEY, + id_student text, + email text NOT NULL, + expiry text NOT NULL, + name_first text, + name_second text +) +``` +This also makes it easier to do the migration when teh Wolves API releases. + +[Patch that fixed it](https://gitlab.skynet.ie/compsoc1/skynet/ldap/backend/-/commit/9db8a238d2bf7be8bcfa86012b26180c041c13d1) + + +## Things to improve for the future. + +* Verify/test it works before a big event. +* If its new enough have a dev env on hand. +* Its not //always// DNS (probally is though) + * Network connectivity is a good first step to test. + diff --git a/src/templates/general.html b/src/templates/general.html new file mode 100644 index 0000000..c60da15 --- /dev/null +++ b/src/templates/general.html @@ -0,0 +1,27 @@ + + + + {title} + + + + + + + + + +
+ +
+{body} +
+
+ UL Computer Society 2023-2023 + +
+
+ + diff --git a/src/templates/index.css b/src/templates/index.css new file mode 100644 index 0000000..ddbe062 --- /dev/null +++ b/src/templates/index.css @@ -0,0 +1,87 @@ + +html { + background: #008B8B url(../images/backgroundsharkycoin.png); + -webkit-font-smoothing: antialiased; +} + +body { + text-align: left; + background: #008B8B; + box-shadow: 0 0 2px rgba(0, 0, 0, 0.06); + color: #F0FFFF; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 16px; + line-height: 1.5; + margin: 0 auto; + max-width: 800px; + padding: 2em 2em 1em; +} + +h1, h2 { + color: #F0FFFF; + font-weight: 600; + line-height: 1.3; +} + +.p1 { + color: #FFFF00 +} + +/* Title bar */ +header { + display: inline-flex; + align-items: center; + justify-content: center; + height: auto; +} + +header img { + float: left; +} + +.boxes { + display: -moz-flex; + background-color: #008B8B; + margin-left: 20%; + margin-right: 20%; + margin-bottom: 3%; +} + +#table { + display: inline; +} + + +/* +Sticky Footer +https://developer.mozilla.org/en-US/docs/Web/CSS/Layout_cookbook/Sticky_footers +*/ +html, body { + box-sizing: border-box; + min-height: 100%; +} + +.wrapper { + box-sizing: border-box; + min-height: 100%; + display: flex; + flex-direction: column; +} + +.page-header, .page-footer { + flex-grow: 0; + flex-shrink: 0; +} + +.page-body { + flex-grow: 1; + background-color: #008B8B; +} + +/* +Spacing in lists +*/ + +li p { + margin: 0; +} \ No newline at end of file diff --git a/src/templates/powerpoint.html b/src/templates/powerpoint.html index a8938b8..6eff8d7 100644 --- a/src/templates/powerpoint.html +++ b/src/templates/powerpoint.html @@ -4,8 +4,8 @@ {title} - - + +