backport of commit c3741b0177056d9e999ff03a6542a4811508fa9a (#21485)
Co-authored-by: Violet Hynes <violet.hynes@hashicorp.com>
This commit is contained in:
parent
0e8ded4936
commit
aa7b7ad951
|
@ -0,0 +1,3 @@
|
|||
```release-note:bug
|
||||
core: Fixed an instance where incorrect route entries would get tainted. We now pre-calculate namespace specific paths to avoid this.
|
||||
```
|
|
@ -879,6 +879,7 @@ func (c *Core) setupCredentials(ctx context.Context) error {
|
|||
// Calculate any namespace prefixes here, because when Taint() is called, there won't be
|
||||
// a namespace to pull from the context. This is similar to what we do above in c.router.Mount().
|
||||
path = entry.Namespace().Path + path
|
||||
c.logger.Debug("tainting a mount due to it being marked as tainted in mount table", "entry.path", entry.Path, "entry.namespace.path", entry.Namespace().Path, "full_path", path)
|
||||
c.router.Taint(ctx, path)
|
||||
}
|
||||
|
||||
|
|
|
@ -1593,7 +1593,11 @@ func (c *Core) setupMounts(ctx context.Context) error {
|
|||
|
||||
// Ensure the path is tainted if set in the mount table
|
||||
if entry.Tainted {
|
||||
c.router.Taint(ctx, entry.Path)
|
||||
// Calculate any namespace prefixes here, because when Taint() is called, there won't be
|
||||
// a namespace to pull from the context. This is similar to what we do above in c.router.Mount().
|
||||
path := entry.Namespace().Path + entry.Path
|
||||
c.logger.Debug("tainting a mount due to it being marked as tainted in mount table", "entry.path", entry.Path, "entry.namespace.path", entry.Namespace().Path, "full_path", path)
|
||||
c.router.Taint(ctx, path)
|
||||
}
|
||||
|
||||
// Ensure the cache is populated, don't need the result
|
||||
|
|
Loading…
Reference in New Issue