Git Product home page Git Product logo

Comments (12)

4a6f656c avatar 4a6f656c commented on May 2, 2024 1

For the purposes of seesaw, the config server is just a web server - you should be able to point it at any HTTPS capable web server and have it fetch configuration protobufs (how those protobufs get created is a separate problem). As such, the Google specific restriction should be removed.

from seesaw.

baptr avatar baptr commented on May 2, 2024

Our config server code itself is only useful internally, so we haven't released it. There's no reason something similar couldn't be built and used (and the RE changed) for anyone, however.

from seesaw.

kunitake avatar kunitake commented on May 2, 2024

OK, I'll try it.

Thank you!

from seesaw.

kunitake avatar kunitake commented on May 2, 2024

Hi,

I tried it.

[cluster]
testcluster

[config_servers]
#primary = https://seesaw-config.localdomain/
primary = seesaw-config.example.com

In this case. The seesaw nodes will access to https://seesaw-config.example.com:10255/config/testcluster

10255 port number is hard coded at engine/config/engine.go

I put testcluster file as cluster.pb.

Finally,

root@testcluster> config source
Config source is server

Thank you for your comments!

I'm happy if seesaw support this featcure with configurable...

Best regards,

from seesaw.

kunitake avatar kunitake commented on May 2, 2024

Oops! Config Server's configuration (edited testcluster file) has not been reflected in the Seesaw nodes when I executed 'config reload' and restart seesaw_watchdog.

Hamm...

from seesaw.

baptr avatar baptr commented on May 2, 2024

The engine log should shed some light on what happened with the config fetch.

from seesaw.

kunitake avatar kunitake commented on May 2, 2024

Hi @baptr ,

You are right! I have some error messages.

  • seesaw_engine.INFO
W0510 16:04:04.916328   30504 fetcher.go:187] Fetch failed: fetch failed from https://config.example.com:10255/config/testcluster (192.0.2.1): unexpected Content-Type: ""
E0510 16:04:04.916344   30504 notifier.go:157] Failed to pull configuration: all config server requests failed

Is the configfile (testcluster file) not same file as cluster.pb?

I'll read source code and try again.

Best regards.

from seesaw.

baptr avatar baptr commented on May 2, 2024

I'm not sure what your testcluster file is. There are basically two configuration files for seesaw.

  • seesaw.cfg is meant to be fairly static, loaded from disk (only) at engine startup, which contains the [ini style] headers and basic node configuration (including the hosts to query as the config server).
  • cluster.pb is the protobuf formatted vserver configuration file, which is what the engine expects to read from the config server.

from seesaw.

kunitake avatar kunitake commented on May 2, 2024

I tested following file as testcluster file.

I used ForceType directive on apache, because seesaw check Content-Type of configuration file.

<Location /config/>
   ForceType  application/x-protobuffer
</Location>

And I got new error message.

W0510 17:08:20.361693    6675 fetcher.go:187] Fetch failed: invalid configuration from https://config.example.com:10255/config/testcluster (192.0.2.1): proto: can't skip unknown wire type 7 for config.Cluster
E0510 17:08:20.361730    6675 notifier.go:157] Failed to pull configuration: all config server requests failed

I began to suspect config_server does not send the protobuf formatted file like cluster.pb.

Should I build config_server as application server?

from seesaw.

baptr avatar baptr commented on May 2, 2024

https://github.com/google/seesaw/blob/master/engine/config/fetcher.go#L142 uses proto.Unmarshal, which expects wire (binary) formatted protobufs.

You could switch that to proto.UnmarshalText, or remarshal your text proto to the wire format and serve that.

from seesaw.

kunitake avatar kunitake commented on May 2, 2024

Hi,

I changed following codes

  • engine/config/fetcher.go
  • engine/config/notifier.go
        // if err := proto.Unmarshal(body, p); err != nil {
        if err := proto.UnmarshalText(string(body), p); err != nil {
                return nil, fmt.Errorf("invalid configuration from %v: %v", source, err)
        }

Finally, it works.

Many thanks to you!

I closed it.

from seesaw.

luo964973791 avatar luo964973791 commented on May 2, 2024

Hi,

I changed following codes

  • engine/config/fetcher.go
  • engine/config/notifier.go
        // if err := proto.Unmarshal(body, p); err != nil {
        if err := proto.UnmarshalText(string(body), p); err != nil {
                return nil, fmt.Errorf("invalid configuration from %v: %v", source, err)
        }

Finally, it works.

Many thanks to you!

I closed it.
Hello, have you changed the codes of the two files fetcher.go notifier.go? I tested it according to your operation, and it still reported an error Failed to pull configuration: all config server requests failed

from seesaw.

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.