[CONTROLLER-1361] Restconf attempt to change TCPMD5 password for PCEP client fails silently Created: 08/Jun/15 Updated: 17/Jun/15 Resolved: 17/Jun/15 |
|
| Status: | Resolved |
| Project: | controller |
| Component/s: | netconf |
| Affects Version/s: | Lithium |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Vratko Polak | Assignee: | Maros Marsalek |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
| External issue ID: | 3625 |
| Description |
|
This bug is critical for TCPMD5 usability. There may be semantic errors in test data, or internal errors in TCPMD5 od PCEP. But in any case, NETCONF/RESTCONF should detect the change was unsuccessful and it should return different HTTP status. Steps to reproduce, first alternative: Second alternative: In step 4, edit only 20-tcpmd5.xml and 32-pcep.xml, step 8 shows no client configuration, step 10 is still 200, step 11 shows still no client configuration. Third alternative: As in second, but use POST in step 9 (URI two levels shorter, XML data the same). Step 10 even reports new location, but no client configuration is created. Fourth (and fifth) alternative: Do not edit files before step 6, use restconf to add the changes between steps 7 and 8. In either case, there is nothing logged at INFO level, and it is not clear to me what is wrong when looking at the long DEBUG level log. |
| Comments |
| Comment by Vratko Polak [ 08/Jun/15 ] |
|
This time I made sure to delete etc/opendaylight/current/controller.currentconfig.xml |
| Comment by Vratko Polak [ 08/Jun/15 ] |
|
Attachment log_20150608.tar.xz has been added with description: archive with TRACE logs for PUT operation |
| Comment by Maros Marsalek [ 10/Jun/15 ] |
|
The problem is in the config-netconf-connector component. It does not handle netconf operations for nested configuration DTOs properly. Needs to be fixed, but in the meantime you can use a workaround: Putting the entire configuration for module, with changed client container. Instead of putting just the client container. |
| Comment by Maros Marsalek [ 15/Jun/15 ] |
|
So far, there was no support for netconf operations apart from merge on nested containers and lists etc. in the netconf->config subsystem pipeline. So updating configuration relied on using merge operation (POST from RESTCONF used to perform merge) but since the RESTCONF change POST behavior, PUT is the only option. Need to add support for nested netconf operations (at least replace to make PUT work from RESTCONF). |
| Comment by Vratko Polak [ 15/Jun/15 ] |
|
> Putting the entire configuration for module, with changed client container. I have verified this workaround works indeed. |
| Comment by Maros Marsalek [ 16/Jun/15 ] |
|
Agree and heres the fix: https://git.opendaylight.org/gerrit/#/c/22687/ But theres a catch, this works fine for nested containers, but the client attribute in pcep-topology-provider is a list and there is no support for replacing/merging specific elements in a list. So the replace operation(PUT from RESTCONF) replaces the entire list, which works fine for when theres only one client element. For other cases, the workaround has to be used. I think we can add this support (full support for nested attributes, especially lists), but it would have to be targeted for Berylium. |
| Comment by Maros Marsalek [ 16/Jun/15 ] |
|
One note: The replace of entire list when changing just one entry is also present when using merge operation. So the POST from RESTCONF on a list attribute (that used to work a while back) would also replace the entire list (list of dependencies was a special case). |
| Comment by Vratko Polak [ 16/Jun/15 ] |
|
> So the replace operation(PUT from RESTCONF) replaces the entire list, which works fine for when theres only one client element. For other cases, the workaround has to be used. Good enough for Lithium. > I think we can add this support (full support for nested attributes, especially lists), but it would have to be targeted for Berylium. Is this for config subsystem, or restconf in general? |
| Comment by Maros Marsalek [ 16/Jun/15 ] |
|
I have already reported an enhancement bug for this: I have set config component for it, but it is an issue of the mapping component between netconf <-> config subsystem |