Skip to content

DUM bucket map YAML lacks effective configuration management, causing weblog uploads to fail with HTTP 500 #410

Closed

Description

@jordanpadams

Checked for duplicates

Yes - I've already checked

🐛 Describe the bug

A data provider uploading Apache weblog files (7 .gz files, 1 batch) with pds-ingress-client consistently fails at the "Requesting Batch 1" step with:

Ingress request failed with HTTP status 500 (Internal Server Error)
The ingestion service encountered an internal error and could not process this request.
Please contact PDS Engineering for assistance.

Authentication succeeds, file indexing and checksum manifest generation complete (7/7 files, 1/1 batches), and the failure occurs before any file is uploaded. The failure reproduced on client v2.5.8 and again on v2.6.3 after upgrading, and on a later retry, so it does not appear to be a one-off transient failure.

The client error message does not include enough detail to determine the root cause (client-side vs. service-side, network vs. Lambda error).

🕵️ Expected behavior

  • The ingress request for the batch succeeds and files are uploaded, or
  • If the service fails, the client reports an actionable error (e.g. response body / request ID / Lambda error detail) and logs enough diagnostic information to identify the cause.

📜 To Reproduce

  1. Install pds-data-upload-manager v2.6.3
  2. Run:
    pds-ingress-client -c <config path> -n <node ID> -w apache -p <weblog dir> -r <report path>.json <weblog dir>/access_log.26090[3-9]*.gz
    
  3. Observe authentication succeeds, manifest generation completes, then the batch request fails with HTTP 500

🖥 Environment Info

  • Version of this software: v2.6.3 (also reproduced on v2.5.8)
  • Operating System: Linux

📚 Version of Software Used

pds-data-upload-manager v2.6.3

🩺 Test Data / Additional context

  • Uses the weblog ingress mode (-w apache) with 7 gzipped access log files, single batch (batch size 100)
  • Reported by a data provider on 2026-11-06; the provider retried and got the same failure
  • Next step is to inspect the Ingress Lambda CloudWatch logs for the failed request time windows

🦄 Related requirements

N/A


For Internal Dev Team To Complete

⚙️ Engineering Details

🎉 Integration & Test

Activity

  1. self-assigned this
    on Nov 7, 2026
  2. added theissue type on Nov 7, 2026
  3. jordanpadams commented on Nov 7, 2026

    @jordanpadams
    MemberAuthor

    Investigation findings

    What the logs show

    Searching the ingress Lambda CloudWatch logs for the failed request windows shows that both the staging and archive bucket checks return 404 Not Found (head_bucket). process_ingress_request then raises a RuntimeError, lambda_handler fails fast, and API Gateway returns the 500 the client reports. The same sequence appears for both of the reporter's attempts.

    This is not a permissions failure. A permissions problem would log exists but access is forbidden (403). The buckets named in the bucket map do not exist in the account and region of the Lambda.

    What it is not

    • Not a client version problem. The failure reproduced on v2.5.8 and v2.6.3.
    • Not a missing flag. The command used -w apache (short form of --weblogs) together with -p <prefix>, which is the required combination. The client therefore sent destination paths of the form weblogs/<node>-apache/..., and all seven files passed indexing, gzip validation and manifest generation before the batch request failed.
    • Not transient. The failure is deterministic: every request for the node hits the same missing buckets.

    Likely root cause: bucket map configuration

    The bucket map in the deployed Lambda (config/bucket-map.yaml) is generated by Terraform from src/pds/ingress/service/config/bucket-map.yaml.tmpl, with the venue variable substituted into bucket names.

    In the template:

    • Each node maps to pds-<node>-staging-<venue> and pds-<node>-archive-<venue>.
    • Only the SBN section has a paths: override routing weblogs/* to the shared web analytics bucket.
    • The NAIF section has no paths: entries.

    So a NAIF weblog path does not match any override and falls through to NAIF's regular staging and archive buckets. In this deployment those two buckets do not exist, hence the 404s.

    Still to confirm

    1. Whether the deployed bucket map matches the template (Lambda console: function > Code tab > config/bucket-map.yaml).
    2. Whether the NAIF staging and archive buckets exist in the deployment. If regular (non-weblog) NAIF uploads also fail, the bucket names or the venue value are wrong. If they succeed, only the weblog routing is missing.
    3. Whether the weblogs/* routing should be added for the other nodes as well as SBN.

    Related improvements (#411)

    • The service log message for this failure said "Possible IAM role or bucket policy misconfiguration" even though the cause was a 404.
    • The client discards the response body, so the only way to find the cause was CloudWatch access.
    • A step-by-step troubleshooting procedure for operators was added to the Operations docs.
  4. changed the title [-]Ingress client fails with HTTP 500 when requesting batch for Apache weblog upload[/-] [+]DUM bucket map YAML lacks effective configuration management, causing weblog uploads to fail with HTTP 500[/+] on Nov 7, 2026
  5. jordanpadams commented on Nov 7, 2026

    @jordanpadams
    MemberAuthor

    Resolution

    Root cause: a configuration management gap. The bucket map YAML (config/bucket-map.yaml in the ingress Lambda) was lost in the most recent deployment. The correct configuration, including weblog routing, was in the deployment documentation, but restoring it was missed in the deployment process. With the entries gone, weblog paths fell through to node buckets that do not exist, so the Lambda failed its bucket check and returned an HTTP 500.

    Remediation: the bucket map was restored by hand with weblog routing for every node. It passes the repo's Yamale schema, and each node's weblogs/* path resolves to the web analytics bucket for both staging and archive. This was a manual edit, so it is replaced the next time the service is deployed unless the deployment process applies it.

    Not yet verified: an end-to-end weblog upload against the restored configuration has not been completed. Both attempts to run the smoke test stopped on client INI config problems before reaching the service.

    Follow-ups

    Closing for now. Reopen if the end-to-end check fails.

  6. moved this from Todo to Done in B19on Nov 7, 2026
  7. jordanpadams commented on Nov 7, 2026

    @jordanpadams
    MemberAuthor

    Update: verified in production

    The weblog smoke test (added in #411) has been run in production and verified. Weblog ingress works end to end with the restored bucket map, which resolves the "Not yet verified" item in the resolution comment above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

Fields

Priority

None yet

Effort

None yet

Product

Data Upload Manager

Work Area

Core Data Services

Start date

None yet

Target date

None yet

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions