teamdfir / sift

SIFT
MIT License
484 stars 67 forks source link

Upgrade issue #593

Closed zaqes closed 1 year ago

zaqes commented 1 year ago

When doing a "sift upgrade" I get this issue.

$ sudo sift upgrade
> sift-cli@1.14.0-rc1+0-g0582d2b
> sift-version: v2022.01.22

> mode: desktop
> downloading v2023.02.06
>> downloading sift-saltstack-v2023.02.06.tar.gz.asc
>> downloading sift-saltstack-v2023.02.06.tar.gz.sha256
>> downloading sift-saltstack-v2023.02.06.tar.gz.sha256.asc
/snapshot/sift-cli/sift-cli.js:357
                  throw new Error(res.body)
                  ^

Error
       at Request.<anonymous> (/snapshot/sift-cli/sift-cli.js:357:17)
       at Request.emit (events.js:400:28)
       at Request.onRequestResponse (/snapshot/sift-cli/node_modules/request/request.js:1059:10)
       at ClientRequest.emit (events.js:400:28)
       at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:647.27)
       at HTTPParser.parserOnHeadersComplete (_http_common.js:127:17)
       at TLSSocket.socketOnData (_http_client.js:515:22)
       at TLSSocket.emit (events.js:400:28)
       at addChunk (internal/streams/readable.js:293:12)
       at readableAddChunk (internal/streams/readable.js:206:10)
       at TLSSocket.Readable.push (internal/streams/readable.js:206:10)
       at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)

Update works fine though

I saw similar mentioned here, https://github.com/teamdfir/sift/issues/432#issuecomment-592017192 Maybe same issue?

digitalsleuth commented 1 year ago

Hi @zaqes , this looks like it might be a different issue, however, the Cast installer is the new CLI for installing SIFT.

Can you give that a shot and let us know how it turns out?

zaqes commented 1 year ago

Ah, I didn't think there was an official change yet.

How do I migrate from SIFT-CLI to Cast? Just install Cast or do I need to uninstall something?

digitalsleuth commented 1 year ago

You can just install Cast, then run sudo cast install teamdfir/sift-saltstack. If you want to run it in server mode (desktop is default) then use the command sudo cast install --mode=server teamdfir/sift-saltstack

zaqes commented 1 year ago

That worked fine. How do I update/upgrade with Cast?

digitalsleuth commented 1 year ago

Running the install command again will automatically fetch the latest, thus conducting an upgrade.

The sift-cli update command essentially re-installed the same version that was already installed to refresh the installation. That function isn't currently available in cast, and likely won't be required.

@ekristen Is there a future plan to add a separate update/upgrade command line for cast?

ekristen commented 1 year ago

That's a good question, install will always grab the latest and run everything.

update is simply an alias to install -version <current-version> upgrade is simply an alias to install

I may or may not add it, unsure, it caused a lot of confusion with people in the past, was trying to simplify.