[NETCONF-15] PUT method returns wrong status code when new resource is created Created: 15/Jan/15 Updated: 15/Mar/19 Resolved: 10/Aug/16 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-nb |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Andrej Marcinek | Assignee: | Jakub Toth |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Linux |
||
| Issue Links: |
|
||||||||
| External issue ID: | 2594 | ||||||||
| Description |
|
When creating new resource with PUT method, status code 200 OK is returned. |
| Comments |
| Comment by Vaclav Demcak [ 24/Apr/15 ] |
|
I guess, there is some mispoint for target specifications so: draft-bierman-netconf-restconf-02 is a targeted implementation specification for now and it doesn't say anything about PUT create vs update. "Consistent with [RFC 7231], if the PUT request creates a new resource, so here is patch for fix: |
| Comment by Vratko Polak [ 10/Sep/15 ] |
|
Current Target Milestone is set to Lithium-1. Is this bug planned to be fixed in Lithium-SR2? |
| Comment by Robert Varga [ 13/Nov/15 ] |
|
Move to NETCONF project |
| Comment by Tomas Cere [ 24/Nov/15 ] |
|
Needs to be ported to Netconf repo |
| Comment by Tomas Cere [ 21/Dec/15 ] |
|
Port of li patch: Discussion with Tony revealed that this way of handling it will introduce some performance issues, so we will probably have to find another way of handling this. |
| Comment by Vratko Polak [ 21/Dec/15 ] |
|
> Port of li patch Li patch is also waiting for review: https://git.opendaylight.org/gerrit/21183 |
| Comment by Vratko Polak [ 21/Dec/15 ] |
|
The fix may affect multiple system test suites in integration/test project. |
| Comment by Jakub Toth [ 14/Jun/16 ] |
| Comment by Robert Varga [ 17/Jun/16 ] |
|
An interim "fix" can be to open a read-write transaction, issue a read (which returns a future) and a put, submit the transaction (which returns a future). Then wait for both futures to complete and return appropriate return code. The problem is that this will not be reliable, as it will suffer from race conditions anyway: if two such operations are executed concurrently, both will return 201 (as that is the state observed in transaction's isolated view). In order to solve this we need support from the data store, specifically an option to report the DataTreeCandidate view of the transaction's effect in the future returned by submit(). The DataTreeCandidate has to be then examined to ascertain whether the target resource was created or not. This will work for local modifications, transferring the candidate from a remote shard may prove to be too costly to be feasible. This definitely needs more analysis. |
| Comment by Jakub Toth [ 07/Jul/16 ] |