Allow constrained pricing health checks to complete

This commit is contained in:
2026-11-15 21:54:21 -05:00
parent a19fab34e3
commit 34f26e6948
15 changed files with 460 additions and 67 deletions
+83 -22
View File
@@ -8,9 +8,11 @@ Startup Pricing Service and the existing Gitea, Jenkins, Caddy and monitoring
foundation. The Canvas page lists November 13, 2026 at 11:59pm; Vincent reports
an extension. Preparation began November 14; DNS/TLS and the first reviewed
Jenkins gate runs were verified November 15. PR~\#24 is merged, the delivery
job is enabled, and the first reviewed v1 image is published. Its staging
deployment stopped at SSH before creating an application container.
\textbf{It is not ready for submission.} Successful v1/v2 staging and production,
job is enabled, and reviewed v1 images are published. After the SSH correction
merged, staging passed its initial HTTPS, identity and price checks. Its
unchanged rerun stopped at Docker's health deadline. A bounded timeout
diagnostic passed; the correction and v2 source/test change await review.
\textbf{It is not ready for submission.} Complete v1/v2 promotion,
production rollback, staging failure/recovery and monitoring correlation remain
pending. Published image metadata is not evidence of a successful deployment.
@@ -18,8 +20,8 @@ The instructor's v1 source and tests were copied from
\path{Examples/dosSecureDelivery/v1/} to \path{delivery/app/}. Flask validates
requests and calculates the price; Gunicorn serves it with one worker on private
port 8000. There is no payment processing, customer data or application volume.
For three units v1 returns USD 30; the separate v2 source/test change must return
USD 36. The image embeds its actual source commit during the build. Health,
For three units v1 returns USD 30; the prepared separate v2 source/test change
returns USD 36 in local tests. It has not been released. The image embeds its actual source commit during the build. Health,
identity and pricing are verified separately.
\section{Deployment and Trust Boundaries}
@@ -41,7 +43,7 @@ identity and pricing are verified separately.
\node[box] (host) at (9.6,0) {The-Ocean host\\\texttt{deploy} SSH account\\Python, Docker/Compose};
\node[box] (monitor) at (0,-2.8) {Prometheus, Grafana,\\Blackbox and Node Exporter\\Private metrics ports};
\node[box] (proxy) at (4.8,-2.8) {Caddy TLS proxy\\Public 80/443\\Private \texttt{gitea\_web} network};
\node[planned] (stage) at (9.6,-2.8) {Planned staging app\\\texttt{staging.yebilly.me}\\{\scriptsize\texttt{pricing-staging:8000}}};
\node[box] (stage) at (9.6,-2.8) {Staging v1 (gate blocked)\\\texttt{staging.yebilly.me}\\{\scriptsize\texttt{pricing-staging:8000}}};
\node[planned] (prod) at (9.6,-5.2) {Production app (planned)\\\texttt{app.yebilly.me}\\{\scriptsize\texttt{pricing-production:8000}}};
\node[data,text width=12.9cm,align=left] (storage) at (4.8,-8.45) {
\textbf{Persistent state and read-only mounts on The-Ocean}\\[3pt]
@@ -54,7 +56,7 @@ Prometheus & \texttt{monitoring\_prometheus\_data} $\rightarrow$ \texttt{/promet
Grafana & \texttt{monitoring\_grafana\_data} $\rightarrow$ \texttt{/var/lib/grafana}\\
Proxy bind mount & \texttt{/root/gitea/Caddyfile} $\rightarrow$ \texttt{/etc/caddy/Caddyfile} (ro)\\
Monitoring mounts & \texttt{/root/monitoring/}: configuration (ro); host \texttt{/} $\rightarrow$ \texttt{/host} (ro)\\
Planned app config & \texttt{/opt/startup/pricing-\{staging,production\}}; no app data volume
Staging app config & \texttt{/opt/startup/pricing-staging}; production pending; no app data volume
\end{tabular}};
\node[draw,dashed,rounded corners,fit=(agent)(local)(builder)(git)(host)(monitor)(prod)(storage),
inner sep=0.55cm,label={[font=\small]below:Existing droplet: 1 vCPU, 2 GiB RAM, 25 GB plan disk}] {};
@@ -64,14 +66,14 @@ Planned app config & \texttt{/opt/startup/pricing-\{staging,production\}}; no ap
\draw[flow] (agent.south west)--node[note,above,sloped]{Git / OCI}(git.north east);
\draw[flow] (agent.south east)--node[note,above,sloped]{SSH}(host.north west);
\draw[flow] (git)--node[note,above]{hook}(jenkins);
\draw[flow,dashed] (host)--node[note,right]{apply}(stage);
\draw[flow] (host)--node[note,right]{apply}(stage);
\draw[flow,dashed] (host.east)--++(0.35,0)|-(prod.east);
\draw[flow,dashed] (monitor)--node[note,above]{probe}(proxy);
\draw[flow,dashed] (proxy)--node[note,above]{HTTP}(stage);
\draw[flow] (proxy)--node[note,above]{HTTP}(stage);
\draw[flow,dashed] (proxy.south east)--node[note,above,sloped]{HTTP}(prod.north west);
\end{tikzpicture}}
\caption{Preparation architecture. Solid boxes are installed; dashed blue boxes
and connections are planned application work. Gray boxes identify durable state
\caption{Current architecture. Solid boxes are installed, including staging;
production and its monitoring connection remain planned. Gray boxes identify durable state
or read-only mounts. Pricing is stateless; each environment retains only its
Compose and release files on the host. The agent and builder now share the
droplet; deployment SSH uses Docker's host gateway with the original pinned
@@ -217,9 +219,9 @@ timing and makes a nonzero changed count on the unchanged rerun a blocking error
\small
\begin{tabularx}{\linewidth}{L{2.1cm}Y Y}
\toprule Traceability field & v1 & v2\\\midrule
Source / config commits & Reviewed merge \texttt{09731ac}; SSH fix awaits review & Separate change pending\\
Registry digest / Jenkins release build & Published in build 3; full digest below & Not published / not run\\
Staging + unchanged rerun & SSH blocked before deployment; rerun not reached & Pending\\
Source / config commits & Reviewed \texttt{a19fab3}; health fix awaits review & Separate source/test change prepared\\
Registry digest / Jenkins release build & Published in builds 3 and 4; identifiers below & Not published / not run\\
Staging + unchanged rerun & Build 4: initial deploy passed, rerun blocked & Pending\\
Production approval / result & No approval or promotion yet & No approval or promotion yet\\
Recovery evidence & Healthy rollback pending & Staging failure/recovery pending\\
\bottomrule
@@ -249,6 +251,7 @@ HIGH/CRITICAL findings. The image was published and pulled back by exact digest.
\end{itemize}
Build 3 recorded these exact source/configuration and image identifiers:
\par\noindent\begin{minipage}{\linewidth}
\begin{Verbatim}[fontsize=\footnotesize,frame=single]
Source/configuration:
09731acb0370566471dd4e401e59bafe55e927dc
@@ -256,6 +259,7 @@ Image repository: git.yebilly.me/ssw590-group1/pricing
Registry digest:
sha256:cccd47f112f839f3443c88c4d16fd7a1ed0fec2100a26464156526d53ccc2695
\end{Verbatim}
\end{minipage}\par\smallskip
Staging failed at 22:26:39 UTC during Gathering Facts:
\texttt{PTY allocation request failed on channel 0}. The recap was
\texttt{ok=0 changed=0 unreachable=1 failed=0}, Ansible exit code 4. No app
@@ -272,8 +276,8 @@ exercises Ansible's actual connection/become path as well as plain SSH.
passed in 17 seconds at 22:50 UTC: Ansible ran \texttt{id -u} as root and
returned 0 without a terminal. Its \texttt{CHANGED} label describes the command
module's default reporting, not a pricing deployment or idempotence test.
This validates connection prerequisites only; the corrected configuration must
be reviewed and merged before the assessed release is retried.
This validated connection prerequisites only. Billy subsequently approved
PR~\#25 and Vincent merged it before pricing build 4, recorded below.
\begin{figure}[htbp]
\centering
@@ -295,12 +299,68 @@ Jenkins archives the complete reports. The ignored local evidence directory is:
\path{build/evidence/assignment8-execution/}
\end{quote}
\section{Staging Rerun and Health Deadline}
On November 16 at 01:46:19 UTC (November 15 Eastern), Billy approved PR~\#25;
Vincent merged it at 01:51:04 as \texttt{a19fab3}.
\href{https://ci.yebilly.me/job/secure-delivery/job/pricing/4/}{Pricing build 4}
ran from that reviewed source/configuration and took 198.101 seconds. Tests,
source/dependency gates and both image gates passed. Its exact identifiers are:
\par\noindent\begin{minipage}{\linewidth}
\begin{Verbatim}[fontsize=\footnotesize,frame=single]
Source/configuration:
a19fab34e39420811e73f91fcfbb82ee598bd74a
Image repository: git.yebilly.me/ssw590-group1/pricing
Registry digest:
sha256:63e2e3d49a5119b1064868b0b15b39a1719a60a632ff0ecdc3f676fcdc55de3b
\end{Verbatim}
\end{minipage}\par\smallskip
Initial staging deployment ran 02:01:48.628--02:02:58.341 UTC (69.713 seconds).
All health, version, source-SHA and quantity=3 total=30 checks passed:
\texttt{ok=10 changed=4 unreachable=0 failed=0}. The unchanged rerun ran
02:03:01.314--02:03:25.201 UTC (23.887 seconds) and stopped at Compose health:
\texttt{ok=4 changed=0 unreachable=0 failed=1}. Zero changes with a failed task
is not a passed idempotence gate. Production approval/deployment were skipped.
Docker reported \texttt{Health check exceeded timeout (3s)}. Completed probes
were near the same deadline. Gunicorn remained running, no OOM kill was
recorded, and staging later became healthy without a restart. A sampled
48.56 MiB usage was below the 64 MiB cap; memory-limit events occurred without
OOM events. This supports a deadline problem under the 0.25 CPU constraint,
not a general explanation for every possible health failure.
At 02:06:37--02:08:24 UTC, an isolated diagnostic ran the same reviewed v1 image
with identical UID, resource and filesystem restrictions, no Docker network,
no published port or proxy alias, and a ten-second overall health timeout.
The HTTP request retained its two-second timeout. Eight consecutive checks
passed in 2.817--5.660 seconds; CPU throttling was observed, with no memory-limit
or OOM events in the diagnostic container. Its exact newly created container ID
was removed in a finally block. Existing staging and shared services were
unchanged. The script and raw JSON are versioned beside the dated build-4
evidence under \path{delivery/evidence/}. This is a prerequisite experiment,
not a production release or a substitute for the unchanged-rerun gate.
The Dockerfile correction changes only the overall health timeout from three
to ten seconds. Endpoint, HTTP timeout, cadence, retries, startup period and
all resource/security limits remain unchanged. The branch also prepares v2
(version v2, unit price 12, total 36); three local functional tests and twelve
control tests passed. The local Windows functional environment used Flask 3.1.3
and Werkzeug 3.1.8; assessed Jenkins deployment remains locked to Werkzeug
3.1.9. Neither the candidate image nor v2 has been released.
Keep the v1 health fix and v2 application/test change in separate reviewed
commits, which may share one PR. Merge with a merge commit, preserving both
SHAs. Select the first commit for v1 and the second for v2. Each must pass the
full release path and its own real human approval; save and review actual
successful release records before recovery. No commit SHA is invented here.
\section{Release, Recovery and Monitoring Runbooks}
The versioned \path{delivery/RUNBOOKS.md} gives the executable sequence.
Vincent handles commits/pushes; Billy reviews repository changes. The v1
preparation is now on main, DNS/TLS are ready, and the two deliberate gate
demonstrations have run. Review/merge the noninteractive SSH correction, then
retry \texttt{release} using the corrected full main commit.
demonstrations have run. The SSH correction is merged. Review/merge the v1
health-timeout fix and separate v2 source/test commit, then retry
\texttt{release} with the reviewed v1 commit first.
Verify staging and changed=0 before a real human approval promotes v1. Save and
review its generated staging/production records. Apply the supplied v2 source
and test changes in another reviewed commit and repeat, expecting 36.
@@ -342,15 +402,16 @@ with no AAAA answer. Codex validated the prepared Caddy additions, saved the
previous configuration and gracefully reloaded it while preserving the earlier
routes, allowlists, volumes and bind-mounted inode. Normal curl and Python TLS
checks confirmed trusted hostname-matching certificates, TLS 1.3 and HTTP 308
redirects. HTTPS currently returns 502 because the pricing backends have not
been deployed; this is not evidence of application health. Certificate and DNS
redirects. Initially both backends returned 502. Build 4 subsequently deployed
staging v1, whose first HTTPS checks passed before the health rerun blocked;
production remains undeployed. Certificate and DNS
details are recorded in \path{delivery/evidence/https-20261115.md}. Existing
Gitea/Jenkins/Grafana checks still passed. The public application port is HTTPS
443, with internal port 8000 remaining private. Distinct DNS hostnames satisfy
the planned routing boundary; successful application deployment remains outstanding.
the planned routing boundary; completed application promotion remains outstanding.
PR~\#24 now includes the runner migration and HTTPS changes and is merged.
Issue creation, review/merge of the SSH correction, successful v1/v2 releases, production approvals,
Issue creation, review/merge of the health fix and v2, complete v1/v2 releases, production approvals,
both recovery demonstrations, final traceability and monitoring evidence, and
the final submission review remain outstanding. Local checks are not a
replacement for those executions.