Giter Site home page Giter Site logo

ppetko / gopxe Goto Github PK

View Code? Open in Web Editor NEW
77.0 77.0 16.0 103.75 MB

PXE Booting/Kickstart - Container running dhcpd, tftpd and golang APIs

License: MIT License

Go 66.86% Shell 6.82% Dockerfile 4.01% Makefile 5.21% HTML 17.10%
apis build-system dhcpd docker golang pxe-boot tftpd

gopxe's People

Contributors

ppetko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gopxe's Issues

unable to perform lint, cause of errors

Hi.
I was trying to build your package, since I was curious how good Golang fits for developing Ops infrastructure tools.
I am using gollvm

I tried to

$make lint

and got

/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:4:2: a blank import should be only in a main or test package, or have a comment justifying it
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:10:1: comment on exported type BoltDB should be of the form "BoltDB ..." (with optional leading article)
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:33:1: comment on exported function GetSession should be of the form "GetSession ..."
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:43:1: comment on exported method BoltDB.CreateBucket should be of the form "CreateBucket ..."
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:71:1: comment on exported method BoltDB.PutBootAction should be of the form "PutBootAction ..."
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:84:1: comment on exported method BoltDB.GetBootAction should be of the form "GetBootAction ..."
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:85:1: error should be the last type when returning multiple items
/home/oceanfish81/go/src/github.com/ppetko/gopxe/bbolt/db.go:101:1: error should be the last type when returning multiple items
/home/oceanfish81/go/src/github.com/ppetko/gopxe/conf/conf.go:15:1: exported function Setup should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:23:6: exported type PXEBOOTTYPE should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:37:6: exported type ACTIONTYPE should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:48:1: exported function LoadTemplates should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:73:1: exported function KsGenerate should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:95:1: exported function GetAllBA should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:117:1: exported function GetBA should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:137:1: exported function PutBA should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:183:1: exported function StatusHandler should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:189:1: exported function Index should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:196:1: exported function BootactionHandler should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:204:1: exported function PxebootHandler should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:230:1: exported function PXEBOOT should have comment or be unexported
/home/oceanfish81/go/src/github.com/ppetko/gopxe/handlers/handlers.go:286:9: if block ends with a return statement, so drop this else and outdent its block
/home/oceanfish81/go/src/github.com/ppetko/gopxe/routes/routes.go:13:1: exported function New should have comment or be unexported
Found 23 lint suggestions; failing.

I am using

$ go version
go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

and my environment looks like this:

$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/oceanfish81/.cache/go-build"
GOENV="/home/oceanfish81/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/oceanfish81/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/oceanfish81/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/oceanfish81/gollvm_dist"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/oceanfish81/gollvm_dist/tools"
GCCGO="/home/oceanfish81/gollvm_dist/bin/llvm-goc"
AR="ar"
CC="/usr/bin/clang"
CXX="/usr/bin/clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build542436827=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

.
I am working on Ubuntu 20.04.1 x86_64 and you can take my "release" build, from here, to reproduce this bug.

how to prevent pxe boot looping

How can I setup the tool to do pxe installation for only one time ?

My server boot order is PXE first, so after installation is done and on next reboot, it may fail into the pxe installation again. And this loop may go forever.

If there is some similiar setting like cobbler pxe_just_once

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.