open-nomad/nomad
Tim Gross e729133134
api: return 404 for alloc FS list/stat endpoints (#11482)
* api: return 404 for alloc FS list/stat endpoints

If the alloc filesystem doesn't have a file requested by the List
Files or Stat File API, we currently return a HTTP 500 error with the
expected "file not found" error message. Return a HTTP 404 error
instead.

* update FS Handler

Previously the FS handler would interpret a 500 status as a 404
in the adapter layer by checking if the response body contained
the text  or is the response status
was 500 and then throw an error code for 404.

Co-authored-by: Jai Bhagat <jaybhagat841@gmail.com>
2021-11-17 11:15:07 -05:00
..
deploymentwatcher gofmt all the files 2021-10-01 10:14:28 -04:00
drainer Node Drain Metadata (#10250) 2021-05-07 13:58:40 -04:00
mock chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
state gofmt all the files 2021-10-01 10:14:28 -04:00
stream events: fix wildcard namespace handling (#10935) 2021-09-02 09:36:55 -07:00
structs api: return 404 for alloc FS list/stat endpoints (#11482) 2021-11-17 11:15:07 -05:00
volumewatcher volumewatcher: fix test data race. 2021-06-14 12:11:35 +02:00
acl.go
acl_endpoint.go nomad: only activate one-time auth tokens with 1.1.0 (#10952) 2021-07-27 13:17:55 -04:00
acl_endpoint_test.go
acl_test.go
alloc_endpoint.go
alloc_endpoint_test.go
autopilot.go
autopilot_test.go test: fix flaky TestAutopilot_CleanupDeadServer 2021-09-28 16:38:56 -07:00
blocked_evals.go Add metrics for blocked eval resources (#10454) 2021-04-29 15:03:45 -04:00
blocked_evals_stats.go Add metrics for blocked eval resources (#10454) 2021-04-29 15:03:45 -04:00
blocked_evals_stats_test.go Add metrics for blocked eval resources (#10454) 2021-04-29 15:03:45 -04:00
blocked_evals_system.go
blocked_evals_test.go Add metrics for blocked eval resources (#10454) 2021-04-29 15:03:45 -04:00
client_agent_endpoint.go json handles were moved to a new package in #10202 2021-04-02 13:31:10 +00:00
client_agent_endpoint_test.go debug: Improve namespace and region support (#11269) 2021-10-12 16:58:41 -04:00
client_alloc_endpoint.go
client_alloc_endpoint_test.go tests: remove duplicate import statements. 2021-06-11 09:39:22 +02:00
client_csi_endpoint.go CSI: volume snapshot 2021-04-01 11:16:52 -04:00
client_csi_endpoint_test.go CSI: volume snapshot 2021-04-01 11:16:52 -04:00
client_fs_endpoint.go
client_fs_endpoint_test.go
client_rpc.go
client_rpc_test.go
client_stats_endpoint.go
client_stats_endpoint_test.go
config.go core: implement system batch scheduler 2021-08-03 10:30:47 -04:00
consul.go consul: correctly check consul acl token namespace when using consul oss 2021-06-08 13:55:57 -05:00
consul_oss_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
consul_policy.go consul: correctly check consul acl token namespace when using consul oss 2021-06-08 13:55:57 -05:00
consul_policy_oss_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
consul_policy_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
consul_test.go consul: correctly check consul acl token namespace when using consul oss 2021-06-08 13:55:57 -05:00
core_sched.go core: implement system batch scheduler 2021-08-03 10:30:47 -04:00
core_sched_test.go CSI: capability block is required for volume registration 2021-04-08 13:02:24 -04:00
csi_endpoint.go CSI ListSnapshots secrets implementation 2021-07-28 11:30:29 -07:00
csi_endpoint_test.go CSI ListSnapshots secrets implementation 2021-07-28 11:30:29 -07:00
deployment_endpoint.go
deployment_endpoint_test.go
deployment_watcher_shims.go consul: plubming for specifying consul namespace in job/group 2021-04-05 10:03:19 -06:00
drainer_int_test.go Migrate all allocs when draining a node (#10411) 2021-04-21 12:11:14 -04:00
drainer_shims.go
endpoints_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
eval_broker.go test: fix fake by increasing time window 2021-09-28 12:22:59 -07:00
eval_broker_test.go test: fix fake by increasing time window 2021-09-28 12:22:59 -07:00
eval_endpoint.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
eval_endpoint_test.go
event_endpoint.go
event_endpoint_test.go events: fix event endpoint tests to ignore heartbeats. 2021-05-24 10:28:19 +02:00
fsm.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
fsm_not_ent.go gofmt all the files 2021-10-01 10:14:28 -04:00
fsm_registry_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
fsm_test.go events: fix wildcard namespace handling (#10935) 2021-09-02 09:36:55 -07:00
heartbeat.go
heartbeat_test.go
job_endpoint.go Merge pull request #11426 from hashicorp/b-set-dereg-eval-priority-correctly 2021-11-05 15:53:10 +01:00
job_endpoint_hook_connect.go fix panic when Connect mesh gateway doesn't have a proxy block (#11257) 2021-10-04 15:52:07 -04:00
job_endpoint_hook_connect_test.go fix panic when Connect mesh gateway doesn't have a proxy block (#11257) 2021-10-04 15:52:07 -04:00
job_endpoint_hook_expose_check.go connect: use deterministic injected dynamic exposed port 2021-04-30 15:18:22 -06:00
job_endpoint_hook_expose_check_test.go connect: use deterministic injected dynamic exposed port 2021-04-30 15:18:22 -06:00
job_endpoint_hooks.go Allow configuring memory oversubscription (#10466) 2021-04-29 22:09:56 -04:00
job_endpoint_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
job_endpoint_oss_test.go gofmt all the files 2021-10-01 10:14:28 -04:00
job_endpoint_test.go Merge pull request #11426 from hashicorp/b-set-dereg-eval-priority-correctly 2021-11-05 15:53:10 +01:00
leader.go nomad: only activate one-time auth tokens with 1.1.0 (#10952) 2021-07-27 13:17:55 -04:00
leader_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
leader_test.go tests: deflake TestLeader_LeftLeader 2021-08-18 14:19:00 -04:00
merge.go
namespace_endpoint.go
namespace_endpoint_test.go
node_endpoint.go Consider all system jobs for a new node (#11054) 2021-08-18 09:50:37 -04:00
node_endpoint_test.go Consider all system jobs for a new node (#11054) 2021-08-18 09:50:37 -04:00
operator_endpoint.go
operator_endpoint_test.go
periodic.go periodic: always reset periodic children status 2021-03-25 11:27:09 -04:00
periodic_endpoint.go
periodic_endpoint_test.go
periodic_test.go periodic: always reset periodic children status 2021-03-25 11:27:09 -04:00
plan_apply.go add /s/port-plan-failure redirect and link to in in plan reject log message 2021-11-02 20:43:54 -04:00
plan_apply_not_ent.go gofmt all the files 2021-10-01 10:14:28 -04:00
plan_apply_pool.go
plan_apply_pool_test.go
plan_apply_test.go reworked Node.Canonicalize() to enforce invariants, fixed a broken test 2021-03-26 18:58:38 +00:00
plan_endpoint.go
plan_endpoint_test.go
plan_normalization_test.go allow configuration of Docker hostnames in bridge mode (#11173) 2021-09-16 08:13:09 +02:00
plan_queue.go
plan_queue_test.go
raft_rpc.go
regions_endpoint.go
regions_endpoint_test.go
rpc.go update tests to make an actual RaftRPC 2021-08-27 10:37:30 -04:00
rpc_test.go update tests to make an actual RaftRPC 2021-08-27 10:37:30 -04:00
scaling_endpoint.go
scaling_endpoint_test.go
search_endpoint.go api: include ent fuzzy struct types in oss 2021-04-20 11:19:38 -06:00
search_endpoint_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
search_endpoint_test.go api: fuzzy search results include job name with id in scope 2021-04-16 17:03:36 -06:00
serf.go
serf_test.go deflake TestNomad_BootstrapExpect and other leader tests 2021-06-10 22:04:10 -04:00
server.go corrected peersInfoContent - was copied from Consul and not updated for Nomad (#11109) 2021-09-01 08:30:49 +02:00
server_setup_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
server_test.go
stats_fetcher.go
stats_fetcher_test.go
status_endpoint.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
status_endpoint_test.go
system_endpoint.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
system_endpoint_test.go
testing.go tests: deflake TestMonitor_Monitor_RemoteServer and cross-region tests 2021-06-10 21:27:55 -04:00
testing_oss.go gofmt all the files 2021-10-01 10:14:28 -04:00
timetable.go
timetable_test.go
util.go
util_test.go
vault.go vault: set JobID in Vault metadata (#11397) 2021-10-27 07:20:29 -07:00
vault_test.go
vault_testing.go chore: fix incorrect docstring formatting. 2021-08-30 11:08:12 +02:00
worker.go Refactor sendAck(3) into sendAck(2),sendNack(2),sendAcknowledgement(3) (#11506) 2021-11-17 10:49:55 -05:00
worker_test.go Refactor sendAck(3) into sendAck(2),sendNack(2),sendAcknowledgement(3) (#11506) 2021-11-17 10:49:55 -05:00