Symptom
PCE constantly recomputes SR-policy path when flex-algo constraint is used.
Conditions
1) PCC has a PCE delegated SR-policy.
2) SR-policy uses flex-algo constraint
3) optimization metric from flex-algo is different from the one configured (or default) for the SR-policy
Workaround
2 possible workarounds (not applicable in 100% of cases):
1. Configure metric-type to same type under SR policy configuration on PCC side as will be retrieved from FAD (It will require metric type to be updated in case of changes in FAD for all impacted policies)
2. Configure Flex-algo definition on head-end or add "distribute link-state" configuration under IGP, so FAD is visible in SR-TE topology. In such case, PCC will use metric-type retrieved from FAD.
Further Problem Description
PCC is configured with a PCE delegated policy using flex-algo constraint.
Consider an SR policy has default o-metric type (TE) and FA 128 is using latency as o-metric.
PCC advertises o-metric TE and FA 128 in PCRpt
PCE computes path based on latency metric (coming from FAD)
PCE sends an update with Metric object having metric type latency
PCC updates metric value, ERO and reports back with TE metric type
PCE sees a different o-metric from the one he computed before and triggers computation and update again.
An infinite loops happens between PCC and PCE.