It may be seen that deleting apply-path that is configured under prefix-list is not taking effect after committing the policy-statement configuration on MX devices.
This article suggests a workaround to resolve this issue.
Example
- Add an apply-path to a prefix-list and apply this prefix-list in a policy-statement as follows:
user@router> show configuration interfaces lo0 | display set
set interfaces lo0 unit 0 family inet address 10.10.10.10/32
user@router> show configuration policy-options prefix-list pl_loopback | display set
set policy-options prefix-list pl_loopback 1.1.1.1/32
set policy-options prefix-list pl_loopback apply-path "interfaces lo0 unit 0 family inet address <*>"
user@router> show configuration policy-options policy-statement apply-path-test | display set
set policy-options policy-statement apply-path-test from prefix-list pl_loopback
set policy-options policy-statement apply-path-test then accept
The policy-statement with the prefix-list is correct.
user@router> show policy apply-path-test
Dec 17 13:19:28
Policy apply-path-test:
Term unnamed:
from prefix-list pl_loopback
route filter:
1.1.1.1/32 exact
10.10.10.10/32 exact << Prefix inherited via apply-path
then accept
-
Now delete the apply-path from the prefix-list.
user@router> configure
Entering configuration mode
[edit]
user@router# delete policy-options prefix-list pl_loopback apply-path
[edit]
user@router# commit and-quit
re0:
configuration check succeeds
re1:
commit complete
re0:
commit complete
Exiting configuration mode
However, observe that the apply-path prefix has not been deleted correctly. It still exists.
user@router> show policy apply-path-test
Policy apply-path-test:
Term unnamed:
from prefix-list pl_loopback
route filter:
1.1.1.1/32 exact
10.10.10.10/32 exact << Prefix inherited via apply-path still exists.
then accept
user@router> configure
Entering configuration mode
The workaround to resolve this condition is to issue commit full
. Notice that the apply-path prefix has been deleted successfully after issuing a commit full
.
user@router# commit full and-quit <<< Issuing "commit full" clears this issue.
re0:
configuration check succeeds
re1:
commit complete
re0:
commit complete
Exiting configuration mode
user@router> show policy apply-path-test
Policy apply-path-test:
Term unnamed:
from prefix-list pl_loopback
route filter:
1.1.1.1/32 exact
then accept