X Tutup
Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module.exports = class AddManagedMachineModal extends ContentModal
then "export KONTROLURL=#{KodingKontrol.getKontrolUrl()} CHANNEL=devmanaged; "
else ''

cmd = "#{kontrolUrl}curl -sL https://kodi.ng/s | bash -s #{token}"
cmd = "#{kontrolUrl}curl -sL https://kodi.ng/c/p/kd | bash -s #{token}"

@loader.destroy()

Expand Down
17 changes: 16 additions & 1 deletion go/src/koding/kites/config/cache.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package config

import (
"errors"
"os"
"os/user"
"path/filepath"
Expand Down Expand Up @@ -88,8 +89,22 @@ func newBoltDB(o *CacheOptions) (*bolt.DB, error) {

_ = util.Chown(o.File, o.owner().User)

// Opening may fail with "bad file descriptor" coming from mmap,
// when file exists and is 0 in size. Best-effort retry - remove
// the file and open it again.
//
// Reproduced on Fedora 25.
if e, ok := err.(*os.PathError); ok && e.Op == "write" {
if fi, e := os.Stat(o.File); e == nil {
if fi.Size() == 0 {
_ = os.Remove(o.File)
db, err = bolt.Open(o.File, 0644, o.BoltDB)
}
}
}

if err != nil {
return nil, err
return nil, errors.New("error opening config: " + err.Error())
}

return db, nil
Expand Down
8 changes: 4 additions & 4 deletions go/src/koding/kites/config/konfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ type Konfig struct {
PublicBucketName string `json:"publicBucketName,omitempty"`
PublicBucketRegion string `json:"publicBucketRegion,omitempty"`

LockTimeout time.Duration `json:"lockTimeout,omitempty"`
DisableMetrics bool `json:"disableMetrics,string,omitempty"`
Debug bool `json:"debug,string,omitempty"`
LockTimeout int `json:"lockTimeout,omitempty,string"`
DisableMetrics bool `json:"disableMetrics,string,omitempty"`
Debug bool `json:"debug,string,omitempty"`
}

// KiteHome gives directory of the kite.key file.
Expand Down Expand Up @@ -385,7 +385,7 @@ func NewKonfig(e *Environments) *Konfig {
},
PublicBucketName: Builtin.Buckets.PublicLogs.Name,
PublicBucketRegion: Builtin.Buckets.PublicLogs.Region,
LockTimeout: 3 * time.Second,
LockTimeout: 3,
}
}

Expand Down
2 changes: 0 additions & 2 deletions go/src/koding/klient/DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ copy: s3://koding-klient/development/215/klient_0.1.215_development_amd64.deb to
copy: s3://koding-klient/development/latest/klient-0.1.215.gz to s3://koding-klient/development/latest/klient.gz
copy: s3://koding-klient/development/latest/klient-0.1.215.darwin_amd64.gz to s3://koding-klient/development/latest/klient.darwin_amd64.gz
copy: s3://koding-klient/development/latest/klient_0.1.215_development_amd64.deb to s3://koding-klient/development/latest/klient.deb
delete: s3://koding-klient/install.sh
upload: ./install.sh to s3://koding-klient/install.sh
# updating latest-version.txt to 215
delete: s3://koding-klient/development/latest-version.txt
upload: ./latest-version.txt to s3://koding-klient/development/latest-version.txt
Expand Down
3 changes: 0 additions & 3 deletions go/src/koding/klient/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ s3cp "s3://${BUCKET}/${CHANNEL}/latest/klient-0.1.${VERSION}.gz" "s3://${BUCKET}
s3cp "s3://${BUCKET}/${CHANNEL}/latest/klient-0.1.${VERSION}.darwin_amd64.gz" "s3://${BUCKET}/${CHANNEL}/latest/klient.darwin_amd64.gz"
s3cp "s3://${BUCKET}/${CHANNEL}/latest/klient_0.1.${VERSION}_${CHANNEL}_amd64.deb" "s3://${BUCKET}/${CHANNEL}/latest/klient.deb"

s3rm "s3://${BUCKET}/install.sh"
s3cp "${REPO_PATH}/go/src/koding/klient/install.sh" "s3://${BUCKET}/install.sh"

echo "# updating latest-version.txt to $VERSION"

echo $VERSION > latest-version.txt
Expand Down
Loading
X Tutup