Giter Club home page Giter Club logo

Comments (5)

dpb587-pivotal avatar dpb587-pivotal commented on August 20, 2024

What does the exact property snippet from your manifest look like? Is this on the app security groups, or which specific cloud_controller_click property is seeing this?

from bosh-cli.

w7tek avatar w7tek commented on August 20, 2024

Here's a trimmed, sanitized example that is very similar to the actual data in my manifest:

# configure the singleton vm
- name: singleton
  - name: cloud_controller_clock
    properties:
      cc:
        security_group_definitions:
        - name: google
          rules:
          - protocol: tcp
            destination: 216.58.195.78
            ports: "80,443"

referenced in the jobs/cloud_controller_clock/templates/cloud_controller_clock.yml.erb:

security_group_definitions: <%= p("cc.security_group_definitions").to_json %>

when prepared under the direction of the new bosh cli produces

security_group_definitions: [{"name": "google","rules":[{"protocol":"tcp","destination":"216.58.195.78","ports":80443}]}]

but under the ruby bosh cli produces the intended

security_group_definitions: [{"name": "google","rules":[{"protocol":"tcp","destination":"216.58.195.78","ports":"80,443"}]}]

from bosh-cli.

w7tek avatar w7tek commented on August 20, 2024

I just noticed that "80,443" looks like the (English-localized?) number 80443 with "," for thousands separator. But I don't understand why that interpretation is the default under one bosh cli and not the other. If I need to rewrite my config, could someone please suggest a workable alternative? (I'm currently trying "443,80" on the chance that avoids triggering numeric interpretation).

[edited to add] Followup: that has no effect. Now, it outputs a numeric 44380 into the JSON/YML

[edited to add] Found a workaround: adding a whitespace after the comma causes the to_json to preserve the stringiness of the value.

from bosh-cli.

dpb587-pivotal avatar dpb587-pivotal commented on August 20, 2024

I was able to reproduce this issue.

Story: https://www.pivotaltracker.com/story/show/131930999

from bosh-cli.

cppforlife avatar cppforlife commented on August 20, 2024

@w7tek looks like we wont be able to easily fix this. it appears that this is a mismatch between how golang and ruby/python/etc. handle yaml decoding. golang is correct according to yaml spec. ruby and python do opportunistic decoding as a number which is not correct according to spec (only _ should be used as a separator). it's unlikely that yaml library we use will accept the change (which i would agree with) so we are not planning to reconcile this behavior. you can avoid this parsing problem by adding a space i believe but ultimately it would be better for cloud controller configuration to take array of ports instead of a comma separated string.

from bosh-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.