Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 123
    • Merge requests 123
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1307

Closed
Created Dec 20, 2022 by Levin Zimmermann@levin.zimmermannMaintainer
  • Report abuse
Report abuse

stack/erp5: Fix NEO URL formatting for WCFS

  • Overview 13
  • Commits 1
  • Changes 3

The NEO/go commit kirr/neo@8c974485 changed the URL with which a NEO/go client can be loaded from

// neo://name@master1,master2,...,masterN?options

to

neo(s)://[credentials@]master1,master2,...,masterN/name?options

We need to apply this change in the NEO URL structure to instance-wcfs.cfg.in to use WCFS with NEO storage.

Why?

The URL in instance-wcfs.cfg.in is finally send to wcfs binary, which will open a NEO/go client with this URL via the "openClientByURL" function [1]. If the URL formatting instance-wcfs.cfg.in follows the old pattern, NEO/go is unable to create a NEO/go client and may even raise an exception [2], because information regarding NEO server is at the wrong position of the URL.

[1] See https://lab.nexedi.com/kirr/neo/blob/87199da2b163c09ed3946b7ab9bb00a5b987d377/go/neo/client.go#L416-534 for openClientByURL.

[2] For instance when using the old pattern of putting the cluster name in the "user" part, NEO/go will raise "credentials can be specified only with neos:// scheme", because NEO/go reserves the "user" part for encryption information, see https://lab.nexedi.com/kirr/neo/blob/87199da2b163c09ed3946b7ab9bb00a5b987d377/go/neo/client.go#L449


This is a follow-up MR of !1283 (closed).

Currently the proposed fix can't be automatically tested by our integration test suite. Please see this comment for an explanation.


@jerome, is it okay to build the URL here with strong concatenation? I noticed you suggested adding Do not build/parse URL by string manipulation to coding crimes in this forum entry. Maybe we could consider using namedtuple with urlunparse as it is demonstrated here.

/cc @jerome /cc @kirr

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: fix-wcfs-url-2
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7